我正在将分支与svn mergeinfo http://myserver.com/branches/FeatureBranch http://myserver.com/branches/UAT --show-revs eligible进行比较,它显示了特性分支中是否有任何内容,但在UAT中却没有。
但是,有人从一个分支创建了一个分支,并进行了2次提交。当我运行该命令时,它会列出来自原始分支的所有提交,而不是只列出of提交。这是我所期望的行为,不过,我只希望看到这两项承诺。
svn log有一个--stop-on-copy选项,可以在日志中显示两个提交,所以我想用mergeinfo命令模拟类似的情况。然而,毫不奇怪,它没有得到支持。
'Subcommand mergeinfo' doesn't accept option '--stop-on-copy'我如何模拟我感兴趣的行为?也许是为了从输出中删除比分支创建的修订更少的内容吗?
发布于 2015-06-05 19:19:49
只需从第二个分支点开始,使用-r传递修订范围。
OP注释:这使脚本看起来如下:
echo "Checking if there are commits beyond the code freeze"
svn log --xml --stop-on-copy $UAT|grep msg|cut -d\> -f2|cut -d: -f1|sort -u|while read branch
do
if [ "$branch" != "" ]; then
echo "Checking branch: $branch"
branchVersion=$(svn log --xml --stop-on-copy $Branches/$branch|grep revision|tail -1|awk -F\" '{ print $2 }')
eligibleRevisions=$(svn mergeinfo -r$branchVersion:HEAD $Branches/$branch $UAT --show-revs eligible)
if [ "$eligibleRevisions" != "" ]; then
echo "Branch $branch Created at $branchVersion"
echo "svn mergeinfo -r$branchVersion:HEAD $Branches/$branch $UAT --show-revs eligible"
echo "$eligibleRevisions"
fi
fi
donehttps://stackoverflow.com/questions/30674187
复制相似问题