Search This Blog

22 August 2009

Subversion working in Unix but not on Windows

So as I was checking out my ambrosia project on Windows today and got this error:

A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\phiTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\PhiTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\tanTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A052119Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A073333Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\eTest.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\A113011Test.java
A    ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\piTest.java
svn: In directory 'ambrosia\thoth\src\test\java\org\eoti\math\cf\constants'
svn: Can't open file 'ambrosia\thoth\src\test\java\org\eoti\math\cf\constants\.svn\tmp\text-base\PhiTest.java.svn-base': The system cannot find the file spe
cified.

Now, it may not be obvious looking at the error message, but here's the note as to the reason:

"Failed to add file '(name here)': object of the same name already exists.
or
"Can't open file 'folder\.svn\tmp\text-base\file.svn-base': The system cannot find the file specified."
Both mean that two files in the same folder have the same name except for capitalization; for example "Readme.txt" and "README.TXT". Unix and Subversion are case-sensitive, so the files are considered to be completely unrelated. But in Windows is not case-sensitive, so when it tries to update README.TXT on top of Readme.txt (say), it breaks.
The surest way to fix the problem is to log in to a Unix system (such as io.uwplatt.edu) and use the unix notes to check out the repository there. You can then use the svn mv command to rename one of the files. If you are in the middle of trying to add a file to your repository, you might try using TortoiseSVN->Rename... to rename the existing file to something entirely different and then updating. Note that you need to use the TortoiseSVN rename commands; merely renaming the file in Windows Explorer won't fix your problems. 

Do you see it? We have phi and Phi; phiTest and PhiTest... why you ask? Because phi and Phi are not the same number.  I am not quite sure how I am going to resolve it (well, will have to change the names - but to what?) but have created an issue for it.

No comments:

Post a Comment