svn diff命令没有任何颜色区分,难以审查,有一款开源的软件:colordiff 可以给svn diff加上颜色。

安装步骤

  • Centos
$ wget http://www.colordiff.org/colordiff-1.0.13.tar.gz
$ tar -xvf colordiff-1.0.13.tar.gz
$ cd colordiff-1.0.13
$ sudo make install
  • Ubuntu
sudo apt-get install colordiff

设置svn

$ vi ~/.subversion/config 

修改diff-cmd = colordiff

### Section for configuring external helper applications.
[helpers]
### Set diff-cmd to the absolute path of your 'diff' program.
###   This will override the compile-time default, which is to use
###   Subversion's internal diff implementation.
diff-cmd = colordiff