You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by c....@gmx.at on 2004/02/27 16:48:44 UTC

"swapping" files or folders by renaming gives strange errors

Hi

try out something like the following:

create work/file-A.txt
create work/file-B.txt
put some lines of content into the files that describe if they are A or B

svn rename file-A to file-Ax
svn rename file-B to file-A
svn rename file-Ax to file-B

commit

fool around a bit with these files, modify A or B or both,
then try to merge or commit them with previous versions.
or swap them back and forth and so on.
or update to a previous version, modify it and try to
merge it back in... (is this allowed at all?)
i got some weird kinds of error situations where i was
unable to commit update or merge my working dir at all
and had to delete and checkout a folder again to continue.
it might be even funnier to swap a folder and a file...

this may rarely happen in real working environments,
but consider you accidentally renamed a .cpp file .h
and vice versa. then you -might- be forced to drop history
and delete and re-add your files. using svn rename to
swap them may introduce collisions.

maybe sort of svn "swap file" or "cvs rename multiple-files"
to exchange files would be fun, too.


Re: "swapping" files or folders by renaming gives strange errors

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-02-27 at 12:22, C.A.T.Magic wrote:

>  svn rename file-A to file-Ax
>  commit
>  svn rename file-B to file-A
>  commit
>  svn rename file-Ax to file-B
>  commit

You never said you were committing between each step.  That will work
fine.  The bug involves 'svn mv A B;  svn mv C A' with no commit
between.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "swapping" files or folders by renaming gives strange errors

Posted by "C.A.T.Magic" <c....@gmx.at>.
i wonder why it worked for me?
-- ok i was too inexact here,
of course i used something like

 svn rename file-A to file-Ax
 commit
 svn rename file-B to file-A
 commit
 svn rename file-Ax to file-B
 commit

and then continued to fool around with these files randomly
using update to previous revisions and merging back and forth.

but probably the reasons for any problems occouring after
that 'swapping' are based on the same "issues".

after doing 1 whole day of testing svn i have the strange feeling
that everything cvs didn't do at all doesn't work very well in svn yet ;-)
( folder renames, named tags, branches, server reboots... )


thanks anyway :-)
====
c.a.t.


----- Original Message ----- 
From: "Ben Collins-Sussman" <su...@collab.net>
To: <c....@gmx.at>
Cc: <us...@subversion.tigris.org>
Sent: Friday, February 27, 2004 18:22
Subject: Re: "swapping" files or folders by renaming gives strange errors


> On Fri, 2004-02-27 at 10:48, c.a.t.magic@gmx.at wrote:
> 
> > svn rename file-A to file-Ax
> > svn rename file-B to file-A
> > svn rename file-Ax to file-B
> 
> The problem here is that 'svn rename A B' isn't a true rename.  It's
> exactly the same as running 'svn cp A B; svn rm A'.
> 
> At the moment, you can't even do the second step, because of a bug
> (issue #845.)
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "swapping" files or folders by renaming gives strange errors

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-02-27 at 10:48, c.a.t.magic@gmx.at wrote:

> svn rename file-A to file-Ax
> svn rename file-B to file-A
> svn rename file-Ax to file-B

The problem here is that 'svn rename A B' isn't a true rename.  It's
exactly the same as running 'svn cp A B; svn rm A'.

At the moment, you can't even do the second step, because of a bug
(issue #845.)




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org