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

Re: Using svn 1.5.1 merge tracking with existing branches

From: Mark Phippard <markphip_at_gmail.com>
Date: Mon, 25 Aug 2008 15:59:54 -0400

On Mon, Aug 25, 2008 at 3:39 PM, Murli Varadachari
<mvaradachari_at_facebook.com> wrote:

> We are planning to switch our subversion 1.4.x repositories over to 1.5.1
> shortly — this effectively means that developers can start using the merge
> tracking functionality right away.
> Our current development model is as follows ==>
> Main development work is done on the trunk -- new features etc are done on
> branches [ based off the trunk]. Developers frequently merge changes from
> the trunk to their feature branches and on occasion merge their work back
> from branch to trunk. The actual revision# and command itself is added as
> a part of the comment during the merge-commit operation.
> Example:
> Create a new branch "mybranch" from trunk at rev# X
> After some trunk commits the changes are sucked into mybranch
> svn merge –r X:Y trunk <mybranch-WC>
> .. Later on more trunk commits are merged to mybranch
> svn merge –r Y:Z trunk <mybranch-WC>
> Finally the branch commits are merged back to trunk..
> svn merge trunk_at_X mybranch <trunk-WC-at latestrev>
> Going forward the simplest solution would have been to have developers (a)
> cut a new branch from trunk and (b) start using the new merge / reintegrate
> process for trunk -> br and br->trunk [reintegrate] merges.
> However that does not seem likely any time soon since many developers are
> not ready to merge back their changes to trunk from their feature branches
> . So my question is how can I convert the current process so that I can
> start using " svn —reintegrate mybranch <trunk-WC>" on existing branches.
> There is no prior merge history in 1.4.x other than comments. At this point
> I can't use the above option — merge complains about not having the
> necessary information to —reintegrate.

Assuming branches were created via svn copy, then SVN should recognize
the natural history of the branch. I'd think if you knew the last
revision from trunk that you had merged from you could run this
command on the branch root and commit the prop change it would create:

svn merge --record-only -r0:LAST_REV url://trunk .

You could probably replace the "0" with the revision when the branch
was created. I'd like to think --record-only is smart enough to do
the same, but I did not try it.

Once you do this, you should be able to start using:

svn merge url://trunk

To merge future changes from trunk automatically. And use
--reintegrate when you are done.

Mark Phippard
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-25 22:00:19 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.