Skip to content

Svn_merging

Tobias Heinemann edited this page Apr 19, 2015 · 1 revision

If you work on a temporary branch, you should periodically merge in changes from trunk.

The procedure

  1. Have a look at the documentation, skipping anything that doesn't refer to subversion >= 1.5 and going to a depth where the `svn mergeinfo' command is discussed.

  2. Make sure that you have a SVN 1.5 client.

Stop doing anything related to merging if you don't. If a 1.4 client gets anywhere near the merging procedure, strange things will happen.

  1. Delete your existing working directory for that branch and check out the branch from scratch with that SVN 1.5 client. Yes, you have to.

(But you want to use a separate check-out (i.e. a directory different from your working directory) for merging anyway.)

  1. In that checked-out version of the branch, use

svn revert -R . svn update

to make sure you have a clean copy of the current state of the branch.

  1. Run

svn mergeinfo --show-revs eligible https://bla.bla/trunk

to see which revisions can be merged.

  1. Run

svn merge https://bla.bla/trunk

to merge in the changes.

Up to this point, you have not done anything to the repository, so just try out items 0. to 5.

  1. Now (successfully run the test suite and then) commit the changes:

svn commit -m 'Merged revs. 12345,12347-12351,12353-12354 from https://bla.bla/trunk'

The list of merged revisions is the one that `svn mergeinfo' gave you before.

Repeat 3.-6. whenever you want to merge again (and I suggest to merge about every 10-15 commits on trunk).









PS: to check out the anelastic branch, say

svn co https://pencil-code.googlecode.com/svn/branches/anelastic-branch

PPS: to merge the latest changes from the main trunk into the anelastic branch, say

svn merge https://pencil-code.googlecode.com/svn/trunk/

PPPS: to go back to the main trunk, use

svn merge --reintegrate https://pencil-code.googlecode.com/svn/branches/anelastic-branch