[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: FAQ suggestion/question

From: Duncan Murdoch <subversion_at_murdoch-sutherland.com>
Date: 2004-08-21 15:31:38 CEST

On Fri, 20 Aug 2004 17:57:27 +0200, Folker Schamel
<schamel23@spinor.com> wrote:

> > I'd suggest that it also talk about how to fix things when someone
> > else changes the case of an existing file.
>
>The FAQ already talks about it:
>
> >>>>>
>
>Then for each working copy, change to the relevant directory and do:
>
>svn update *
>svn update
>
><<<<<

Yes, that works; thanks! I guess I'd modify my suggestion to update
the FAQ to explain what it's doing, since the description there
suggested to me that this code wasn't relevant to my problem. It
would also be a lot faster for me to use

svn update readme
svn update

since the "svn update *" command generates a separate update request
for every file in the directory. Here's suggested text to revise the
FAQ:

--------------

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.

You can accomplish this by copying the file somewhere temporary,
deleting the file from Subversion, then adding the copy with the
correct case, but a better way is by performing a move operation with
Subversion URLs. Using URLs is recommended, because it will preserve
history for the file, and will take effect immediately.

Both fixes will leave Windows working copies with problems, because
Windows can still get confused when trying to add the file with the
new case. One way of fixing the problem is to delete your working copy
and check out again. If this is not possible, you must perform a two
step update.

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

svn mv svn://svnserver/path/to/file.java
svn://svnserver/path/to/File.java

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

svn update file.java
svn update

The first update will remove file.java from your working copy, the
second update will add File.java, leaving you with a correct working
copy.

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!

-----------

On a related question: couldn't the problem be avoided if the svn
update command updated existing files first, then applied the new file
additions?

Duncan Murdoch

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Aug 21 15:32:19 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.