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

Re: Can a merge follow changes in paths in trunk/branch?

From: Matt England <mengland_at_mengland.net>
Date: 2006-02-10 20:27:57 CET

At 2/10/2006 11:50 AM, Lieven Govaerts wrote:

>Quoting Matt England <mengland@mengland.net>:
> >
> > However, I believe I'm addressing a situation that appears to be different
> > from the one described above (although I will read more on the bug
> > reference below to study further):
> >
> > After a 'svn copy' of a "trunk" to "branch" at rev M:
> >
> > svn copy trunk/ branch/
> > branch/folder/test.txt modified
> > trunk/folder/test.txt modified
> > branch/folder/test.txt -- moved to --> branch/newfolder/test.txt
> > branch/newfolder/test.txt modified (in addition to above modification)
> > trunk/folder/test.txt modified (in addition to above modification)
> > trunk/folder/test.txt -- moved to --> trunk/newfolder/test.txt
> > cd trunk/
> > # both trunk/ and branch/ now have a uniquely-modified newfolder/test.txt
> > svn merge -r M:N ../branch
> >
> > Will all the changes made in test.txt in both the trunk and the branch be
> > merged together properly?
>No they will not, in fact, you have a 'bigger' problem:
>Since you create a new folder 'newfolder' both in trunk and in branch, for
>subversion these are different folders. Although they have the same name,
>identity is different ( and rightly so ).

So it appears that, at least in this context, a merge is not a recursive
diff. Is this a correct statement? In this same thought: it's probably
obvious that I'm still very unfamiliar about what subversion *is* and *is
not* doing with respect to merges (and I realize the Lieven and Ryan and
possibly others are trying to tell me...and the info is trying to seep
through into my brain). I hear that that there is no merge tracking...but
that there is a lot of special things that merge does from diff. I'm
finding myself thoroughly confused, in part because I don't yet understand
why some merge intelligence would be put in without "all" the intelligence,
but I suspect I will learn more about this if I choose to continue to study
it (which might be hard to find time to do at this point).

The much-bigger question:

What, if anything, can we do to merge our branches? Are we going to have
to through and do diffs by hand...or something extremely manual? We may be
in a really bad place, and I'm trying to see what we can do to get around
this problem.

I'm going to be dreaming up some potential work arounds and trying them in
a test repo. Any suggestions are appreciated.

I'm hoping I can at least get around this by making all the directory and
file-path structures the same and then using a standard unix patch command
and apply the patch output to the trunk. Does that make sense?

Also, it's important to note that I goofed up my scenario example
above. This is what we actually did:

svn copy trunk/ branch/
branch/folder/test.txt modified
trunk/folder/test.txt modified
trunk/folder/test.txt -- moved to --> trunk/newfolder/test.txt
branch/folder/test.txt modified (in addition to above modification)
trunk/newfolder/test.txt modified (in addition to above modification)
# Right now the trunk and the branch won't merge,
# presumably because they have a different directory layout (??)...
# ...so we try making the same directory layout...
branch/folder/test.txt -- moved to --> branch/newfolder/test.txt
cd trunk/
# so that now both trunk/ and branch/ now have the same dir structure,
# but apparently that doesn't work, either, for some reason I don't yet
# understand, but I'm still a young grasshopper wrt svn merge wisdom.
svn merge -r M:N ../branch

In summary, we were re-orging the dir structure in the trunk (one of my
developers got a bit too ambitious with a reorg without considering the
implications of an outstanding branch) before merging in changes we had in
a significant branch.

I'm not sure if this fact changes the nature of the problem and possible
solutions, but I thought it worth mentioning.

Ryan and Lieven- I very much appreciate your help. If you are interested,
I would be happy to pay either of you directly (say, via paypal.com) if
you'd be interested in providing me some direct-and-interactive support, in
hopes that it can save you time of having to read and reply to my lengthy
emails...as well as hopefully make you a few bucks.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 10 20:39:21 2006

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

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