我试图获取更改的文件总数,在特定的 SVN 提交中添加和删除的行总数,但没有成功。
我试过类似的东西:
svn diff -r 12983:12984 > patch.diff
cat patch.diff | grep $'+'
cat patch.diff | grep $'-'
但它看起来不正确。另外,我无法弄清楚我更改了多少文件。
我怎样才能做到这一点?
我实际上得到它与以下工作:
svn diff -r REV1:REV2 > patch.diff
cat patch.diff | grep $'^+ ' | wc -l # additions
cat patch.diff | grep $'^- ' | wc -l # deletions
svn diff --summarize -r REV1:REV2 | wc -l # total files changed
感谢大家。