繁体   English   中英

在Subversion中,列出在主干上已更改但在分支上未更改的文件,并且这两个文件都已更改

[英]In Subversion, list files that have changed on the trunk but not on a branch and which have changed in both

我需要知道Subversion中继中已更改的文件,特定分支上未更改的文件以及两个文件中都已更改的文件。

目前,我的方法是获取主干和分支中已更改文件的列表,并使用文件差异工具来查看差异。

有没有比这更好的技术了?

当您有权访问unix shell(或uniq,sort和sed工具)时,可以执行以下操作:

# getting the changed file list in trunk
svn diff --summarize /path/to/repos/trunk@branch-rev /path/to/repos/trunk | sed -e 's/......//' > changes-trunk
# the sed part removes the status columns, which might cause uniq to fail identifying equal files

# getting the changed file list of the branch
svn diff --summarize /path/to/repos/trunk@branch-rev /path/to/repos/branch/foobar| sed -e 's/......//' > changes-branch
# display the files which changed on both branches
sort changes-trunk changes-branch | uniq -d > possible-conflicts

# getting the base file list
svn ls -R /path/to/repos/trunk@branch-rev > files-base
# getting the list of files not changed in trunk
sed -e "s# /path/to/repos/trunk@branch-rev/##" changes-trunk | sort - files-base | uniq -u > untouched

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM