如何仅检出在一系列SVN版本中修改过的文件? [英] How can only the files that were modified in a range of SVN revisions be checked out?
本文介绍了如何仅检出在一系列SVN版本中修改过的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以仅从SVN存储库中检出在一个或多个修订版本中修改过的文件,而不检出任何未修改过的文件?
Is it possible to checkout only those files from a SVN repository that were modified in a revision or range of revisions, without checking out any files that were not modified?
推荐答案
我的建议与flolo的建议相同.但是,需要一个范围. 您可以使用以下shell函数.
My suggestion is in the same lines as flolo suggests. But, takes a range. You could the following shell function.
function checkout_files_in_revrange()
{
svn_url=$1;
start_rev=$2;
end_rev=$3;
for theCheckoutCanditate in `svn log -r $start_rev:$end_rev --verbose --incremental | grep " M " | cut -f5 -d' ' | cut -f3- -d/`
do
svn co $svn_url/$theCheckoutCandidate -q;
done
}
这篇关于如何仅检出在一系列SVN版本中修改过的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文