Merging Branches         Branch maintenance requires a reliable procedure for merging between branches

Merging Branches


The OGRE development approach involves maintaining many branches of the codebase, the most common purpose for which is separating new, interface-breaking or riskier development from stable maintenance branches. Branch maintenance requires a reliable procedure for merging between branches.

General Approach

  • Branches will be located in subfolders of
  • Branches for stable versions will be named after the major and minor version number, e.g.
  • Bugfixes should be committed to the earliest stable branch being maintained and merged forward, through later branches if applicable and into the trunk
  • New features should be committed to the trunk, or to a branch which has not yet been made officially stable
  • Branch merging is automated with svnmerge


  • You'll need to install the command-line version of Subversion as well as svnmerge.
  • You'll need to permanently accept the SSL cert for the Ogre Subversion server at least once before running svnmerge, so for example do a checkout on the command line (svn co ogre_trunk) and choose to 'Permanently Accept' the certificate.

Taking a branch

  • Create the branch from the source (usually) trunk using svn copy, using URLs and not a local copy e.g.
svn copy
  • In a working copy of each SVN location you want to be able to merge changes in this new branch into (ie at least trunk), initialise svnmerge:
svnmerge init
  svn ci -F svnmerge-commit-message.txt

Merging changes

If you have committed changes to the branch and want to merge them, perform these steps in a (clean) working copy of the destination (trunk or later branch):

  • Merge the code changes
svnmerge -S merge
  • If there were any conflicts, resolve them
  • Build and test the merged code
  • Commit the merge
svn ci -F svnmerge-commit-message.txt

Why use svnmerge instead of SVN 1.5's merge?

Mostly because these procedures predate SVN 1.5, are proven, and svnmerge operates in exactly the same way as SVN 1.5's merge anyway. It's nice not to require SVN 1.5 particularly as it's fairly new.