You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mycroft Holmes <ps...@gmail.com> on 2007/01/31 10:41:56 UTC
BUG in svn switch with A+ files
Hi, this message got ignored in users mailing list, but I'm
definitely convinced it's a bug.
Here are the detailed steps to reproduce:
1) create an empty repo with 2 folders TRUNK and RELEASE.
2) put some files in TRUNK (e.g. a.txt b.txt c.txt)
3) svn cp TRUNK RELEASE/R1 -m ""
4) add a file in TRUNK and commit (e.g. d.txt)
5) svn co RELEASE/R1
6) merge last commit from TRUNK. obviously it succeeds and "d.txt"
gets added
at this point:
[C:\Files\r2]svn st
A + d.txt
now the bug:
7) svn cp . svn://server/repo/RELEASE/R2 -m ""
8) svn switch svn://server/repo/RELEASE/R2
this fails!
[C:\Files\r2]svn switch svn://localhost/test/release/r2
svn: Failed to add file 'd.txt': object of the same name already exists
[C:\Files\r2]svn st
! .
S b.txt
S c.txt
A +S d.txt
S a.txt
at this point, svn info reports "." is release/r2
Is there a workaround?
Thanks in advance
MH
--
The set of solutions is never empty.
Two solutions together form a new problem.
-- Mycroft Holmes
Re: BUG in svn switch with A+ files
Posted by Mycroft Holmes <ps...@gmail.com>.
>
>
> This is not a bug. After the copy, the WC still points to the
> original location,
correct
and still has the original modifications.
in general correct, but in this case it has NO local modifications...
You'd
> have to revert, remove unknown files, and then switch.
Yup, but this sounds like a workaround...
I know what you want to achieve: svn should notice that both files
> are "the same". Except, they aren't.
No, they are :)
1) I agree that in general, when svn finds LOCAL modifications, it should
stop.
2) I deduce that "adding a file with history" is somehow considered a "local
modifcation to the working copy", but the error message is at least
misleading.
3) I think 'svn switch' should be added a '--force' option
I'm not sure if in this case a simple "--relocate" would help (maybe
relocate + update?)
Re: BUG in svn switch with A+ files
Posted by Francois Beausoleil <fr...@gmail.com>.
Hi !
2007/1/31, Mycroft Holmes <ps...@gmail.com>:
> [C:\Files\r2]svn switch svn://localhost/test/release/r2
> svn: Failed to add file 'd.txt': object of the same name already exists
This is not a bug. After the copy, the WC still points to the
original location, and still has the original modifications. You'd
have to revert, remove unknown files, and then switch.
I know what you want to achieve: svn should notice that both files
are "the same". Except, they aren't. If you create the file, copy,
then change the file again, what should Subversion do ? Replace your
local mods ? That's a no. Subversion is very careful about never
losing the user's data.
Hope that helps.
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/