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

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

From: Mohammed Bustany <mbustany_at_successfactors.com>
Date: 2007-12-27 02:48:31 CET

Hi,

 

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?

 

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.

 

Thank you

Mohammed

 

 

 

 

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.

 
Received on Thu Dec 27 02:48:19 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.