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

Diff of svn:mergeinfo -- explicit vs. inherited mergeinfo

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 3 Jul 2014 17:50:59 +0100

Our mergeinfo diffing (in 'svn diff') is quite broken with regard to inherited mergeinfo.

Starting with a directory 'A' having mergeinfo

  /trunk:16-18

if I do a subtree merge of /trunk/B:20 into A/B, then A/B gets a new svn:mergeinfo property with this value:

  /trunk/B:16-18,20

That is, the previously inherited part is now explicit, and r20 is added. But 'svn diff' shows

  Added: svn:mergeinfo
  ## -0,0 +0,1 ##
    Merged /trunk:r16-18,20

which is just wrong. With a large mergeinfo property such as is typically found on trunk of a busy project, the output is large and useless: it's impossible to guess which revisions were merged or unmerged. It would be more honest to just show a regular diff of the raw value and not parse it.

What we should do instead is tell the user what was merged or unmerged into this node (and, implicitly, into the subtree rooted here) by comparing with the previous, inherited mergeinfo.

Something like, perhaps:

  Added: svn:mergeinfo
  ## -0,0 +0,1 ## (diff against previously inherited mergeinfo)
    Merged /trunk/B:r20

If we follow this suggestion, it then follows that a mergeinfo diff should be shown even where there is no explicit svn:mergeinfo property, if there is any change in inherited mergeinfo; but because mergeinfo is implicitly inheritable, this only needs to be shown for the root node of the diff.

This may need a little more thinking around the subject, and a little UI design, but it's something I am sure we need to do, that has been on my mind for a year or more now.

- Julian
Received on 2014-07-03 18:51:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.