Attention à la casse dans SVN !

svn: In directory 'C:/Projects/ozclim/source' 
svn: Can't open file 
'C:/Projects/ozclim/source/.svn/tmp/text-base/reefclim.dof.svn-base': \
    The system cannot find the file specified.

Looks like you have two versions of the file in the same repository directory whose names differ only in case (reefclim.dof and ReefClim.dof). To confirm that this is so, list the contents of the directory in the repository with "svn ls url://to/repo/directory"

How do I change the case of a filename?

This problem comes up in two situations. If you're adding files on an operating system with a case-insensitive filesystem, such as Windows, you might find you accidentally add a file with the wrong case in the filename. Alternatively, you may just decide to change the case of an existing file in the repository.

If you're working in a case-sensitive file system, this is no problem at all. Just move the file to the new name, e.g.,

svn mv

But this won't work in a case-insensitive operating system like Windows. In Windows you can accomplish this by copying the file somewhere temporary, deleting the file from Subversion, then adding the copy with the correct case. Or a better way is to perform a move operation with Subversion URLs. Using URLs is recommended, because it will preserve history for the file, and will take effect immediately.

Both ways will leave Windows working copies with problems, however, because Windows can still get confused when trying to update the conflicting filenames. (You'll get a message like svn: Failed to add file '': object of the same name already exists). One way of fixing the problem is to delete your working copy and check out again. If you do not want to do this, you must perform a two step update.

For each file with the wrong case, the following command will change the case:

svn mv svn://svnserver/path/to/ svn://svnserver/path/to/

To update the working copy, change to the relevant directory and do:

svn update
svn update

The first update will remove from your working copy, the second update will add, leaving you with a correct working copy. Or if you had a lot of problematic files, you can update the working copy this way:

svn update *
svn update

As you can see, adding a file with the wrong case is tricky to fix on an operating system that has a case insensitive filesystem. Do try to get it right when you add the file the first time! To prevent the problem from occurring in the first place, you can create a pre-commit hook that calls the file That file lives in the Subversion source tarball, in the directory contrib/hook-scripts.

See also