[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: <kfogel_at_collab.net>
Date: 2004-08-24 14:47:24 CEST

Couple of suggestions:

Please post FAQ changes in patch format, so we can see exactly which
question is being modified (in this case, it's the one anchored as
"case-change", I'm guessing), and put "[PATCH]" in the subject line so
we can't miss it.

Comments on the change itself:

Duncan Murdoch <subversion@murdoch-sutherland.com> writes:
>
> 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.

That last paragraph above would be confusing to a new user, because
they wouldn't know why Windows is "trying to add the file" in the
first place (it's not clear until later that you mean during 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!
>
> -----------

We might want to preserve the original "update *" example too, but in
general I think these are improvements. Would you be willing to tweak
as described above and post it to dev@ as a "[PATCH]" posting? If
short on time, I can rewrite it myself and apply, just let me know.

> 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?

Yes :-).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 24 16:25:55 2004

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