How are the sub folder's mergeinfo used when merging at top folder level?

1.5k views Asked by At

As we know, TortoiseSVN creates svn:mergeinfo as a folder property if the merge is performed at that folder level. This could be a top folder (such as trunk) or some sub folder. I always thought that it was OK to merge at sub folder level since the svn:mergeinfo on the sub folders would be used when merging at the top folder level. I think that it was generally working for me as well in the past, until today when I saw a case that I could not explain.

I saw a merge at sub folder level from a branch to trunk and I could see at that revision an svn:mergeinfo property on that sub folder at trunk as well.

However if I try to merge from branch to trunk again at the top folder level, that merged revision at branch is not greyed out. If I try to merge, it would just merge the property at the top folder without really any code change. If I try to merge one folder up from that sub folder, that merged revision is not greyed out as well.

I could not explain what I saw here. Could anyone shed some light on this? I am using the latest TortoiseSVN 1.8.1. In the past I was using TortoiseSVN 1.7 and below. Has the latest version of TortoiseSVN changed the behavior for this intentionally or am I missing something here?

1

There are 1 answers

0
Lazy Badger On BEST ANSWER
  1. Don't use tricks, which you don't understand fully
  2. Don't use tricks, when they aren't needed (subtree merges is a must in a rare, some special cases only)
  3. Read relevant part ("Subtree Merges and Subtree Mergeinfo" topic) from SVN Book gently, slowly, without haste

And now, considerations regarding your question:

  • When you merge some revisions in subtree, in means nothing for parents - because for parents of any level these revisions are not merged (even if they haven't any objects outside subtree)
  • Mergeinfo of subtree used only for avoiding duplicated merge in this subtree (not above or below), when the same revision(s) merged later to some parent (and moved to merge-root of parent, when such merges with intersected revision (in subtree and parent merges) is done)