svnmerge.py - Managing Subversion Branches

I’ve been doing a lot of subversion branch, test, merge cycles against our main Puppet configuration repository. I’ve run into issues when both the trunk and my testing branches are modified after I’ve forked off my branch.

This creates merge conflicts when I’m done testing, and need to merge my changes back into the production branch.

In an effort to reduce the overhead associated with manually resolving each conflict that arises from the divergence, I’ve started employing the use of svnmerge.py.

It’s great.

  svn copy cluster-orange-server cluster-orange-server-test01
  svn checkin cluster-orange-server-test01 -m 'Branched testing off.'
  cd cluster-orange-server-test01

  svnmerge.py init
  svn ci -F svnmerge-commit-message.txt

Now that my pristine branch of the production code has been initialized with svnmerge, I’m free to make changes to my testing copy. Once I need to merge back into production, I just need:

  svnmerge.py merge
 

No Comments

  1. I’d like to add that while this worked really well initially, once a colleague also started using svnmerge from the same trunk, we ran into issues.

    What wasn’t initially clear to me is that the trunk should be initialized to both branch, my colleague’s and my own, and each of our branches should be initialized and tracking only the main trunk.

Leave a comment

You must be logged in to post a comment.