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

Re: Understanding move merge

From: <kevin_at_pilch-bisson.net>
Date: 2003-01-20 13:30:10 CET

On Mon, Jan 20, 2003 at 12:18:36PM -0600, Karl Fogel wrote:
 Lele Gaifax lele@seldati.it writes:
      KF It turns out that there are some complexities involved in
      KF implementing true renames that are actually quite difficult to
      KF deal with, so we've simply postponed dealing with it till
      KF after 1.0.
  
  Are those documented somewhere?
 
 Yes, in the code and in some issues, I believe.
 
      KF In Subversion there are still a few bugs about certain
      KF commands not following copy history correctly
  
  Uhm, I missed this! Am I wrong understanding this as it's not the
  copy+delete implementation that prevents this to happen, but it's a
  bug in the merge command?
 
 Well, the bugs are about following history, so they'd be present
 whether the history was a copy or an atomic rename. (The nature
 of the historical traces is the same -- there's an ancestor, and then
 a new thing based on that ancestor.)
 
 In other words, no, it's not the copy+delete implementation.
 
Actually it could be. Consider the following.

svn cp http://server/trunk http://server/branch
svn co http://server/branch
cd branch
svn cp template.c foo.c
svn ci
edit foo.c
svn ci
cd ../trunk
edit template.c
svn ci

Now I want to merge the changes back and forth. I probably don't want to
merge both sets of changes together, because this was a copy.

However, if I do the exact same thing, but with a mv instead of cp, I DO want
to merge the changes in.

svn cp http://server/trunk http://server/branch
svn co http://server/branch
cd branch
svn mv template.c foo.c
svn ci
edit foo.c
svn ci
cd ../trunk
edit template.c
svn ci

Now I probably do want the changes to be applied. As Kazinator pointed out on
IRC, copy is to create a new, but related item in the fs, whereas move/rename
should not change the object, just it's location as far as operations like
merge are concerned.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention. - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • application/pgp-signature attachment: stored
Received on Sat Oct 14 02:02:53 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.