How to identify which target revision was created by a merge operation?
When I retrieve (using svnlook pg) the svn:mergeinfo property on a file (in the example, /myProject/trunk/file.txt), I get these pieces of information: /myProject/branches/branch_013/file.txt:121-125 /myProject/branches/branch_019/file.txt:157-162 /myProject/branches/branch_023/file.txt:204-206 /myProject/trunk:197-199 /myProject/trunk/file.txt:197 I interpret it this way: each line contains a "source" path that was merged to the "target" /myProject/trunk/file.txt alongside the range of source revisions that were merged. I wonder how I can identify which target revision was created by the merge operation. Is there any other property that contains such an information? Or is it possible only by comparing the outputs of several svnlook pg with different -r options?
The most comprehensive treatise I could find on "svn:mergeinfo" is here:  https://www.open.collab.net/community/subversion/articles/merge-info.html Another one to read is:  https://resources.collab.net/blogs/where-did-that-mergeinfo-come-from The simplest way to determine which merge created which target revision is to get the list of target revisions for the file/directory in question using "svn log" and then search backwards until the value of "svn:mergeinfo" no longer contains the source revision "entry" that you're looking for. The earliest to have the line in question is your answer. Well, maybe (see ). However, if you start using the "-r" option then you're going to have to deal with merge inheritance (see ). And that's going to be even more complicated to analyze. And, historical differences in behavior between, for example, SVN 1.5 and 1.6, will make things more difficult. Of course, and here's the rub, all of the above assumes that nobody was able to change those properties directly (e.g. "svn propdel"): if they did then "all bets are off". That includes the use of the "svn-mergeinfo-normalizer" tool (google it).
1-2 of 2
Reply to this discussion
You cannot edit posts or make replies: You should be logged in before you can post.