所以我想 compare this folder http://cloudobserver.googlecode.com/svn/branches/v0.4/Boost.Extension.Tutorial/libs/boost/extension/
与 this http://svn.boost.org/svn/boost/sandbox/boost/extension/
。结果我想得到一个差异文件。这些文件夹受 svn 控制,但我更喜欢 git 样式的差异文件(如 shown here )我试过 git diff
但它似乎不适用于 web 文件夹。那么如何在 Linux 上用一个命令做同样的事情呢?
更新: 所以我们有 a great answer .但是它的工作原理很奇怪-在我看来,它表明所有文件(相同的文件)的所有内容都替换为完全相同的内容(虽然我确定只有 3-4 行代码行发生了变化)...
更新 2: 为了实现我真正需要的(在 Linux 上只有真正改变的行的 dif 文件,使用 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 工具中破解它:)
https://stackoverflow.com/questions/5874090/