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

Re: Perl script for intelligent merge

From: marvin greenberg <mgreenberg_at_dctd.No.spam.saic.com>
Date: 2004-03-06 04:11:43 CET

It's a script that attempts to track the merges between two branches, by marking
merges with log messages, and then incrementally applying the deltas. We
started doing something like this a long time ago, but decided it just wasn't
worth it.

If you have two branches

-------a------------d-----e--------- trunk
         \ / \
          \ delta / \
           b------c------------------ somebranch

You work on somebranch for a while, (and other folks on the trunk, say)
Someone wants to merge what you've done, so they do
   svn merge -r b:c http:/somebranch trunkWorkingCopy creating a d revision.

Then later you want to merge the changes from the trunk to your branch. What
you have to do according to the red book, is remember all the merges, and don't
apply them again.
    svn merge -r a:d-1 http:/trunk somebranchWorkingCopy
    svn merge -r d:e http:/trunk somebranchWorkingCopy

You don't want to apply the delta from d-1:d since those were changes that came
from "somebranch". Horst's script attempts to automate this, by marking merges
with special log messages to "remember" what has been merged.

The big problem is that you can't automate it because conflicts can happen, in
which case the script dies in the middle leaving the developer with even less
clues what's going on. (Also early on, svn had some problems with diff, that
made it real problematic)

marvin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 6 09:53:47 2004

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