You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vineet Kumar <vi...@doorstop.net> on 2006/06/02 16:13:00 UTC

svn update doesn't merge local changes across remote directory moves

I have a situation where a user makes a local modification to a file in
a working copy:

vineet@quesadilla:/var/tmp$ svn co -r34214 svn+ssh://svn/users/joe/test
A    test/test
A    test/test2
A    test/test2/file
A    test/test2/file2
A    test/test3
A    test/test3/project
A    test/test3/project/pants
A    test/test3/project/pants/blah
A    test/test-move
A    test/test-move/new
A    test/test-move/new/stuff
A    test/pants
A    test/pants/blah
A    test/project
Checked out revision 34214.
vineet@quesadilla:/var/tmp$ cd test
vineet@quesadilla:/var/tmp/test$ echo "goodbye" >> test3/project/pants/blah
vineet@quesadilla:/var/tmp/test$ svn diff
Index: test3/project/pants/blah
===================================================================
--- test3/project/pants/blah    (revision 34214)
+++ test3/project/pants/blah    (working copy)
@@ -1 +1,2 @@
 hello
+goodbye

Now another user goes and moves test3/project/pants to test3/pants.

When the first user does an "svn update", they now get a new directory
test3/pants without their local modification in it.  Their local change
isn't discarded; the file still exists at project/pants/blah, but
project/pants is no longer a working copy.

svn switch provides a bit more warning to the user in this situation:

vineet@quesadilla:/var/tmp/test$ svn st -u
       *            test3/pants/blah
       *            test3/pants
M           34214   test3/project/pants/blah
       *    34214   test3/project
       *    34214   test3
Status against revision:  34231
vineet@quesadilla:/var/tmp/test$ svn switch svn+ssh://svn/users/joe/test
svn: Won't delete locally modified directory 'test3'
svn: File 'test3/project/pants/blah' has local modifications
vineet@quesadilla:/var/tmp/test$

Is there a way to get svn update to do anything more in this type of
situation?  Even just emitting a warning that it was removing a
directory but leaving behind files with local modifications would be
much better.  Currently, it just does this silently.

I'm using subversion 1.2.3.

good times,
Vineet
-- 
http://www.doorstop.net/

Re: svn update doesn't merge local changes across remote directory moves

Posted by Ryan Schmidt <su...@ryandesign.com>.
Keith Stanley wrote:

> Eric Hanchrow wrote:
>
>> Vineet Kumar wrote:
>>
>>>     I have a situation where a user makes a local modification to  
>>> a file in
>>>     a working copy:
>>>
>>>     Now another user goes and moves test3/project/pants to test3/ 
>>> pants.
>>>
>>>     When the first user does an "svn update", they now get a new  
>>> directory
>>>     test3/pants without their local modification in it.
>>
>> This one burned me, too, a long time ago.  As far as I know,  
>> there's no
>> workaround other than vigilance.  However, I hear that the much- 
>> heralded
>> "true rename" work will fix this (and that is precisely why I'm so  
>> eager for
>> that work to get released).  Maybe it'll show up in 1.5.
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=898
>
> The only way I see to move directories like this is tell the whole  
> group to
> stop making any commits while someone svn moves the directories and  
> then
> commits them.  If anyone has a better idea, I am all ears?

That's pretty much what I would do, until "true renames" are  
implemented. I'd probably tell my coworkers to make sure to commit  
their changes by the time they leave on Friday and do the move over  
the weekend, and remind the team to update before starting work on  
Monday. If your team works on weekends too or doesn't have defined  
work times, then you'll have to coordinate it some other way.



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

RE: svn update doesn't merge local changes across remote directory moves

Posted by Keith Stanley <th...@charter.net>.
I am new to this email message board thing, so please excuse me if I am
violating a protocol.

I have had a similar problem...

In my working copy I have..
dir_1/file.c

I rename the directory with..
svn mv dir_1 dir_2

Before I can do a commit, my buddy changes dir_1/file_a.c in his work area
and commits the change.

I update my work area with..
svn update

I now have..
dir_1/file.c
dir_2/file.c

with dir_1/file.c being more current.

At this point a commit works without error, but I loose my buddies changes.
Not Good!

So, instead if I do a unix..
cp dir_1/file.c dir_2/file.c

And then a svn commit I get a chksum error from dir_2/file.c   If I try...
Svn mv dir_1/file.c dir_2/file.c

I get errors from svn.


The only way I see to move directories like this is tell the whole group to
stop making any commits while someone svn moves the directories and then
commits them.  If anyone has a better idea, I am all ears?

Thanks
Keith Stanley
 

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Eric Hanchrow
Sent: Friday, June 02, 2006 12:56 PM
To: users@subversion.tigris.org
Subject: Re: svn update doesn't merge local changes across remote directory
moves

>>>>> "Vineet" == Vineet Kumar <vi...@doorstop.net> writes:

    I have a situation where a user makes a local modification to a file in
    a working copy:

    Now another user goes and moves test3/project/pants to test3/pants.

    When the first user does an "svn update", they now get a new directory
    test3/pants without their local modification in it.

This one burned me, too, a long time ago.  As far as I know, there's no
workaround other than vigilance.  However, I hear that the much-heralded
"true rename" work will fix this (and that is precisely why I'm so eager for
that work to get released).  Maybe it'll show up in 1.5.

http://subversion.tigris.org/issues/show_bug.cgi?id=898

-- 

            |\      _,,,---,,_
      ZZZzz /,`.-'`'    -.  ;-;;,_
           |,4-  ) )-,_. ,\ (  `'-'
          '---''(_/--'  `-'\_) fL

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

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

Re: svn update doesn't merge local changes across remote directory moves

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Vineet" == Vineet Kumar <vi...@doorstop.net> writes:

    I have a situation where a user makes a local modification to a file in
    a working copy:

    Now another user goes and moves test3/project/pants to test3/pants.

    When the first user does an "svn update", they now get a new directory
    test3/pants without their local modification in it.

This one burned me, too, a long time ago.  As far as I know, there's
no workaround other than vigilance.  However, I hear that the
much-heralded "true rename" work will fix this (and that is precisely
why I'm so eager for that work to get released).  Maybe it'll show up
in 1.5.

http://subversion.tigris.org/issues/show_bug.cgi?id=898

-- 

            |\      _,,,---,,_
      ZZZzz /,`.-'`'    -.  ;-;;,_
           |,4-  ) )-,_. ,\ (  `'-'
          '---''(_/--'  `-'\_) fL

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