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

血红的双手。 提交于 2019-12-31 10:04:21

问题


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?


回答1:


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



回答2:


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?



来源:https://stackoverflow.com/questions/3806775/command-line-to-list-all-mergecopies-in-subversion

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!