所以我想比较这个文件夹 http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/
with this http://svn.boost.org/svn/boost/sandbox/boost/extension/ http://svn.boost.org/svn/boost/sandbox/boost/extension/
。我想得到一个 diff 文件作为结果。这些文件夹受 svn 控制,但我更喜欢 git 样式的 diff 文件(例如此处显示 https://stackoverflow.com/questions/5836948/boost-extension-simple-inheritance-sample-why-we-see-no-animals-on-linux/5838527#5838527) 我试过git diff
但它似乎不适用于网络文件夹。那么如何在 Linux 上用一个命令做同样的事情呢?
Update:所以我们有一个很好的答案 https://stackoverflow.com/questions/5874090/linux-how-to-get-diff-between-all-files-inside-2-folders-that-are-on-the-web/5874256#5874256。但它的工作方式很奇怪 - 在我看来,它表明所有文件(相同的文件)的所有内容都被替换为非常相同的内容(虽然我确信只有 3-4 行代码发生了变化)...
更新2:要实现我真正需要的(Linux 上仅包含真正更改的行的 diff 文件,具有 git 样式),请执行以下操作:
$ svn export http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/ repos2 --native-eol CRLF
$ svn export http://svn.boost.org/svn/boost/sandbox/boost/extension/ repos --native-eol CRLF
$ git diff repos repos2 > fileWithReadableDiff.diff
一旦你有了源树,例如
diff -ENwbur repos1/ repos2/
更好
diff -ENwbur repos1/ repos2/ | kompare -o -
并用一个好的 GUI 工具来破解它:)
- -Ewb 忽略大量空白更改
- -N 检测新文件
- -u 统一
- -r 递归
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)