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

RE: Confused about branches and partial switches

From: Bob Archer <bob.archer_at_amsi.com>
Date: Fri, 10 Jul 2009 10:03:38 -0400

>My last question is do I really need to delete and recreate my branch after each merge to trunk? This seems to be the prevailing >wisdom on the articles I've found, but I find it's often hard to tell whether or not svn branching advice applies to svn 1.6 or only earlier >versions with more primitive branching support.

No you don't. After you do your --reintegrate do a merge from trunk to branch with record only.

Let's say you branch at rev 100 and you are doing regular merges from trunk to branch to keep up with the trunk changes.

Now you are at a point where you want to merge your branch into trunk. So you switch to your trunk WC (I don't use switch I check out each path separately so I don't have to remember what path I am working on).

On your trunk do your merge from branch with --reintegrate. When you commit that it make note of the revision. For example, it's revision 125.

Now switch back to your branch WC and do a merge from trunk, this time specifying the revision from the commit of your merge (125 for example) and use the record only option... I think the command would be something like (sorry I mostly use Tortoise)

svn merge -r 125 --record-only $REPO/PathToProjectTrunk
svn ci

From there you can carry on in the branch. As you do further merges from trunk to branch it will not merge in r 125 because it that was recorded as already merged in. When you are ready you can once again do a --reintegrate merge to trunk... rinse and repeat.

BOb

DISCLAIMER: Don't blame me if this doesn't work. You might want to try it on a test repo so you can see what is going on. After you do the record only merge you can do an svn st and or an svn propget svn:merginfo . to see that the rev is added properly.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2369723

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-10 16:04:37 CEST

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.