Dennis Miller
Dennis Miller

Reputation: 992

Command line to list all merge(copies) in subversion?

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?

Upvotes: 7

Views: 6441

Answers (2)

khmarbaise
khmarbaise

Reputation: 97359

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

Upvotes: 13

Sander Rijken
Sander Rijken

Reputation: 21615

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?

Upvotes: 0

Related Questions