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

Re: How to: Periodically merge changes from the main branch to a private branch

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-27 03:29:57 CET

On Dec 26, 2007, at 19:48, Mohammed Bustany wrote:

> Our development requires various private branches. I wrote up this
> set of instructions on how to periodically merge from the main to
> the private branch to avoid major conflicts when the private branch
> is to be merged into main.
>
> When I re-run the merge command using the revision at branch
> creation, I was expecting that no merge would take place, but it
> did and caused conflicts for binary files. Is that the expected
> behavior?

It's expected, because Subversion 1.4.x and earlier do not have any
merge tracking ability, hence you must manually track it yourself, or
use the svnmerge.py script to manage it for you.

> The instructions just look very convoluted and error prone. There
> must be a better way to do this periodical merge. Your help is
> greatly appreciated.

Subversion 1.5 will have merge tracking (somewhat similar to or at
least compatible with the functionality of svnmerge.py I believe)
built-in. I believe pre-release builds of Subversion 1.5 are already
available if you want to test this functionality.

> 1) Determine the starting revision number.
> The starting revision number is either the revision number when
> your private branch was created or, if you have already done at
> least 1 merge, the ending revision from the last merge plus 1.
>
> To determine the revision when your branch was created:
> $ svn log --verbose --stop-on-copy build.template
> The output will be similar to:
>
> $ svn log --verbose --stop-on-copy build.template
> ----------------------------------------------------------------------
> --
> r3611 | svn | 2007-12-19 10:39:24 -0800 (Wed, 19 Dec 2007) | 2 lines
> Changed paths:
> A /purple/branches/xitgm (from /purple/trunk:36117)
>
> A branch for changes.
>
> ----------------------------------------------------------------------
> --
>
> To determine the starting revision from your last merge, look at
> the log of one of the files that got merged. You should have put
> the ending revision number in the checkin comments.
>
>
>
> 2) Determine the Ending revision number. This is the "Last Changed
> Rev" for purple/trunk. You can use the keyword HEAD but I recommend
> using an explicit revision number. You can find out the "Last
> Changed Rev" in several ways; probably the simplest is to do an svn
> update on purple/trunk then svn info . will give you the "Last
> Changed Rev".
> $ svn info .
> Path: .
> URL: https://svn.successfactors.com/repos/purple/trunk
> Repository Root: https://svn.successfactors.com/repos
> Repository UUID: 9d512ef7-28b5-da11-a818-00123f20d848
> Revision: 3623
> Node Kind: directory
> Schedule: normal
> Last Changed Author: dsmith
> Last Changed Rev: 3622
> Last Changed Date: 2007-12-26 16:09:52 -0800 (Wed, 26 Dec 2007)
>
>
>
> 3) Run the merge command:
> $ svn merge -r 3611:3622 https://svn.successfactors.com/repos/
> purple/trunk .
>
>
>
> 4) Commit your changes. Include the merge command syntax in your
> checkin comment in order to maintain the starting and ending
> revision numbers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 27 03:30:50 2007

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.