You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Daniel Schlyder <da...@dascdev.net> on 2003/08/30 23:08:37 UTC
Renaming only case on Windows
Hi list,
I'm a new user of Subversion (and RCS altogether -- what a great productivity
booster!). I'm trying to rename a file in a working copy on Windows XP:
Try #1:
$ svn mv foo Foo
Fails with error:
svn: Trying to use an unsupported feature
svn: cannot move path 'foo' into itself
Try #2:
$ svn mv foo temp
$ svn mv temp Foo --force
Fails with error:
svn: Trying to use an unsupported feature
svn: Cannot copy or move 'temp' -- it's not in the repository yet,
perhaps because it is a copy or is inside a copied tree.
Try committing first.
Try #3:
$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
$ svn up
Fails with error:
svn: Obstructed update
svn: failed to add file 'Foo': object of the same name already exists
Try #4:
$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
$ cd ..
$ rm -r working-copy
$ svn co file:///repos/trunk working-copy
$ cd working-copy
Succeeds! But is hardly a nice way to do this. Is it the only way on Windows?
TIA,
Daniel Schlyder
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by Jack Repenning <jr...@collab.net>.
At 11:00 AM +0200 8/31/03, e.huelsmann@gmx.net wrote:
>Jack you forgot that the rm left the textbase in the .svn
>directory.
I'm *supposed* to forget that. That's SVN's internal choice. If SVN
were to fix this "rename case only" problem by removing that file, or
if SVN were to fix this problem by leaving it there but being clever
about it, or if SVN fixed this problem by mental telepathy makes no
difference to me.
>That obstructs the update too. Should it do so when there is no equally
>named wc file?
Again, internal decision, not my problem;-)
--
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by e....@gmx.net.
Hi.
> [31.08.2003 01:44:18] Jack Repenning:
> >>$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed
> file."
> >>$ svn up
>
> > Here, "rm foo" between the svn commands would have made it all work. Or,
> in
> > general, when you see "obstructed update," you can respond by removing
> or
> > renaming the obstructing file. This is another case of SVN's care not to
> > trash anything of yours.
That's correct. Jack you forgot that the rm left the textbase in the .svn
directory.
That obstructs the update too. Should it do so when there is no equally
named wc file?
> 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
>
Bye,
Erik.
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by Daniel Schlyder <da...@dascdev.net>.
[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
Re: Renaming only case on Windows
Posted by Jack Repenning <jr...@collab.net>.
At 2:40 AM +0200 8/31/03, Daniel Schlyder wrote:
> >>$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
> >>$ svn up
>
> > Here, "rm foo" between the svn commands would have made it all work. Or, in
> > general, when you see "obstructed update," you can respond by removing or
> > renaming the obstructing file. This is another case of SVN's care not to
>> trash anything of yours.
>
>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?]
I daresay what's "obstructed" is the removal of the old spelling (on
the positive side, it's good that SVN *did* notice that the new
spelling was in place, and not simply remove it while trying to
remove the old one!).
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.
I think this amounts to another case of issue 898
<http://subversion.tigris.org/issues/show_bug.cgi?id=898>
variously called "rename should be atomic" and "rename should not be
implemented as 'copy + delete.'"
--
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by Daniel Schlyder <da...@dascdev.net>.
[31.08.2003 01:44:18] Jack Repenning:
> Well, you skipped prety quick from "the easy things that don't work" to
> "really huge things that, yes, do work."
Okay. :)
> There are one or two middle-sized ways to get the effect:
> The quickest way to make this approach work is to use a filesystem that
> understands what you're trying to say (a case-sensitive file system).
Well, switching from Windows to an OS that supports such a filesystem certainly
sounds like a "really huge thing". :) Or are you suggesting Windows can be made
to support case-sensitive filenames?
>>$ svn mv foo temp
>>$ svn mv temp Foo --force
> In between your two "svn mv" commands, you could "svn commit" (as suggested
> by the messages). You'd also need an "svn update", I think.
Yeah, I considered that, but wanted to avoid the extra revision.
>>$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
>>$ svn up
> Here, "rm foo" between the svn commands would have made it all work. Or, in
> general, when you see "obstructed update," you can respond by removing or
> renaming the obstructing file. This is another case of SVN's care not to
> trash anything of yours.
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
Thanks for helping,
Daniel Schlyder
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by Russell Yanofsky <re...@columbia.edu>.
Jack Repenning wrote:
> At 1:08 AM +0200 8/31/03, Daniel Schlyder wrote:
>> Hi list,
>>
>> I'm a new user of Subversion (and RCS altogether -- what a great
>> productivity booster!). I'm trying to rename a file in a working
>> copy on Windows XP:
>
> Well, you skipped prety quick from "the easy things that don't work"
> to "really huge things that, yes, do work." There are one or two
> middle-sized ways to get the effect:
>
>> $ svn mv foo Foo
>>
>> Fails with error:
>> svn: Trying to use an unsupported feature
>> svn: cannot move path 'foo' into itself
>
> Your underlying file system, Windows, thinks "foo" and "Foo" are the
> same file (looks like you understand that well enough). SVN is, in
> general, very careful not to trash files you already have (this will
> come up again in a moment). The quickest way to make this approach
> work is to use a filesystem that understands what you're trying to
> say (a case-sensitive file system).
Isn't this just a case of over-zealous error checking? "ren foo Foo" works
just fine on windows. There's no reason why "svn mv" couldn't work as well.
- Russ
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Renaming only case on Windows
Posted by Jack Repenning <jr...@collab.net>.
At 1:08 AM +0200 8/31/03, Daniel Schlyder wrote:
>Hi list,
>
>I'm a new user of Subversion (and RCS altogether -- what a great productivity
>booster!). I'm trying to rename a file in a working copy on Windows XP:
Well, you skipped prety quick from "the easy things that don't work"
to "really huge things that, yes, do work." There are one or two
middle-sized ways to get the effect:
>$ svn mv foo Foo
>
>Fails with error:
>svn: Trying to use an unsupported feature
>svn: cannot move path 'foo' into itself
Your underlying file system, Windows, thinks "foo" and "Foo" are the
same file (looks like you understand that well enough). SVN is, in
general, very careful not to trash files you already have (this will
come up again in a moment). The quickest way to make this approach
work is to use a filesystem that understands what you're trying to
say (a case-sensitive file system).
>$ svn mv foo temp
>$ svn mv temp Foo --force
>
>Fails with error:
>svn: Trying to use an unsupported feature
>svn: Cannot copy or move 'temp' -- it's not in the repository yet,
>perhaps because it is a copy or is inside a copied tree.
>Try committing first.
In between your two "svn mv" commands, you could "svn commit" (as
suggested by the messages). You'd also need an "svn update", I think.
>$ svn mv file:///repos/trunk/foo file:///repos/trunk/Foo -m "Renamed file."
>$ svn up
>
>Fails with error:
>svn: Obstructed update
>svn: failed to add file 'Foo': object of the same name already exists
Here, "rm foo" between the svn commands would have made it all work.
Or, in general, when you see "obstructed update," you can respond by
removing or renaming the obstructing file. This is another case of
SVN's care not to trash anything of yours.
--
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org