3

What is the difference between 'svnmerge' (alias svnmerge.py, the python script that comes with svn) and 'svn merge' (Subversion 1.5's native merge-tracking)? Which one do you recommend?

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
Angel
  • 401
  • 1
  • 4
  • 11
  • 2
    I suspect that `svnmerge` is an alias for `svn merge` – Dana the Sane Nov 02 '09 at 21:46
  • Well svnmerge doesn't contain a space and svn merge doesn't. I am also not sure this belongs on stackoverflow. Perhaps superuser. – MitMaro Nov 02 '09 at 21:48
  • 1
    My system doesn't have an svn merge, so I think Dana is right. – Jamison Dance Nov 02 '09 at 21:54
  • Tuure's post below may also be correct, it's impossible to tell which without more info from the Asker. – Dana the Sane Nov 02 '09 at 22:15
  • I found this page where svnmerge and switching to svn native merge tracking is mentioned (under "Merge tracking and compatibility"): http://subversion.tigris.org/svn_1.5_releasenotes.html#merge-tracking. This is what I am talking about. – Angel Nov 02 '09 at 22:47
  • 4
    @Dana the Sane: `svnmerge` *is NOT* an alias for `svn merge`. `svnmerge` is a script to do basic merge tracking on top of old (before 1.5) releases of Subversion which provided no merge tracking of their own. – bendin Nov 04 '09 at 13:56

2 Answers2

10

Prior to 1.5, the Subversion merge command didn't leave much information on which branches were reintegrated to the trunk, so svnmerge.py was written to make up for this lack of traceability.

Starting with version 1.5, meta-information is generated by svn at each merge, the svn:mergeinfo property which is transparently appended to the target paths. You can appreciate that for example if you use TortoiseSVN, which can show you a graph.

This is not perfect yet though, as many would rightly say.

So you should see what your needs are, if the standard svn merge is not enough for you, have a look at scripts like svnmerge but in that case, make sure everyone uses the same tool.

In my experience, the standard option is more than enough in most cases.

Community
  • 1
  • 1
RedGlyph
  • 11,309
  • 6
  • 37
  • 49
  • Does this answer implies that svn merge is less capable than svnmerge? – Angel Nov 06 '09 at 00:25
  • 1
    Not really since 1.5. There are some features in `svnmerge` that don't exist in the native Subversion merge, like keeping a list of merged/unmerged commits, blocking some revisions, but apparently the disadvantages can outweight those not-so-useful additional features, as you can see here: http://blogs.open.collab.net/svn/2007/10/subversion-15-m.html. Also, there are more and more reports of `svnmerge` problems with Subversion 1.6. You can see the feature list and FAQ on their website: http://www.orcaware.com/svn/wiki/Svnmerge.py – RedGlyph Nov 06 '09 at 09:52
  • @RedGlyph: the blogs link you posted no longer exists. :-( so much for the idea of permalinks – Jason S Jul 07 '11 at 13:06
  • @JasonS [The Wayback Machine still has a copy](https://web.archive.org/web/20090503105758/http://blogs.open.collab.net/svn/2007/10/subversion-15-m.html) – Izkata Jul 13 '15 at 16:00
4

svnmerge is an external tool for "automatic branch management", whereas svn merge is the basic tool for mergin branches in Subversion itself. As you don't tell what you want to do, it's a bit hard to recommend either.

Tuure Laurinolli
  • 4,016
  • 1
  • 22
  • 21