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

Re: Renaming only case on Windows

From: Daniel Schlyder <daniel_at_dascdev.net>
Date: 2003-09-04 00:41:54 CEST

[02.09.2003 18:49:27] Jack Repenning:
> At 2:40 AM +0200 8/31/03, Daniel Schlyder wrote:
>>I couldn't get this to work. 'svn up' fails with error:
>>Restored foo
>>svn: Obstructed update
>>svn: failed to add file 'Foo': object of the same name already exists

> Whoah, you're right! More specifically: when you update the rename
> of Foo to foo (after moving the obstructing old "Foo" aside), the
> update of the new, desired file ("foo") works, but then you get an
> "Obstructed update" complaint about the old, defunct spelling
> ("Foo"). [Note that I think the original svn commands at the top,
> and the svn messages at the bottom, are for reversed cases here,
> right?]

Now you're confusing me. :) I ran the same commands, only with 'rm' in the
middle, as you suggested:

$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
$ rm foo
$ svn up

There was no file Foo to begin with; only foo. Seems it's automatically
reconstructed from info in .svn dir.

> At the moment, I think they only way to get there from here is this sequence:

>> >>$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo.tmp -m
>>"Renamed file 'foo' to 'Foo.tmp'."
>> >>$ svn up
>> >>$ svn mv file:///repos/trunk/Foo.tmp file:///repos/trunk/Foo -m
>>"Renamed file 'Foo.tmp' to 'Foo'."
>> >>$ svn up

> Here, the deletion of the old spelling happens during the first 'svn
> up', and there's no obstruction in renaming back to the new spelling
> during the second 'svn up'. There is, of course, and extra revision
> in this solution (which you elsewhere mentioned wanting to avoid).
> And every other working copy (on a case-challenged system) is going
> to have to do two updates to cross this boundary as well, either in
> synchrony with this process ("svn mv; OK, everybody update; svn mv;
> OK, everybody update again"), or by explicitly naming the middle
> revision. Yuck.

Yuck, indeed. :) Actually, I can do it in one revision by updating the file
directly in repository and discarding the old working copy, but that's only
because I'm the sole developer on this project, so discarding the working copy
isn't such a big deal. It would be very nice if, at some point, 'svn mv foo
Foo' could work just like Russell Yanofsky pointed out that 'ren foo Foo' does.

Kind regards,
Daniel Schlyder

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 4 00:43:37 2003

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