tags:

views:

33

answers:

2

How can you list all subversion merges?

For example:

Trunk ____9_____14____20___
          \      \     \
           \______\_____\____
Branch01   10     15    21

If I branched on rev 9, and then did a merge at rev 14. What is the subversion command line that identifies rev 15 as a merge from rev14 from trunk? The only way I can tell now is from the log file. However, I know I can issue the following command:

svn log –-stop-on-copy svn:<URL>/branches/Branch01

and it will stop on rev 10 (branched). Is there a command I can issue, that will list 21, 15, and 10 as copies from trunk?

A: 

During each merge operation, the svn:mergeinfo property is changed to record the merge. The mergeinfo will be on Branch01 in this case. Subversion only records where changes are merged from, not where they are merged to.

I'm not sure if it's enough in your use case, but you could try to find out all revisions of Branch01 that have mergeinfo changes?

Sander Rijken
+2  A: 

You can use the svn plist command for this...

 svn plist -v svn:mergeinfo URL/branches/Branch01

will print out the information about the branch

an other way is to use the --use-merge-history

svn log -v --use-merge-history URL/branches/Branch01

EDIT: The following seemed to me what you are searching for.

svn mergeinfo URL/trunk URL/branches/Branch01 --show-revs merged
khmarbaise
I tried log and it lists everything, however, I'm trying to only list points where a merged or branch occurred. The plist keeps giving me an error svn: '.' is not a working copy. I'm trying to run this on a repository that is stored on my local machine. svn plist -v svn:mergeinfo file:///home/iser/svn_repo. Any ideas why plist is giving me this error.
Dennis Miller
The svn log command you gave worked ? (svn plist -v svn:mergeinfo svn:<URL>/branches/Branch01) ?
khmarbaise
The svn log command returns all log information for the branch. It does not list only the points for merges. The svn plist returns '.' is not a working copy. This is the exact command I typed: svn plist -v svn:mergeinfo file:///home/dmiller3/svn_repo/branches/Recorder_004
Dennis Miller
Well I found out two problems. One rapidsvn does not modify mergeinfo properties when it merges. However, when I switch to rabbitvcs, it does. Then when I run the above commands, it all works. Thanks.
Dennis Miller
Rapidsvn seemed to be stopped in development...strange.
khmarbaise