SVN diff Replacement tool
http://blog.csdn.net/fudesign2008/article/details/8168811
One. Replace SVN diff with Vimdiff:
For most Linux developers, Vimdiff's display of file differences is obviously much more intuitive than SVN diff.
So can we use Vimdiff instead of SVN diff? Fortunately, SVN considers this and supports third-party programs as a contrast difference. Now we just need a simple script to encapsulate this command so that it can be compared using a third-party program. As follows:
1. Create a shell script, I will name it Mydiff, store it under/usr/bin, and enter the following code:
[Plain]View Plaincopy
- #!/bin/sh
- # Specifies the path of the Vimdiff.
- diff= "/usr/bin/vimdiff"
- # SVN provides sixth and seventh parameters as input for base and local latest text
- LEFT=${6}
- RIGHT=${7}
- #调用vimdiff做比较
- $DIFF $LEFT $RIGHT
Then give the file executable permissions: chmod +x/usr/bin/mydiff
2. Configure the SVN configuration file in the personal home directory: ~/.subversion/config, locate and configure as follows:
[Plain]View Plaincopy
- [Helpers]
- Diff-cmd =/usr/bin/mydiff
Save the exit and you are ready to use.
This way, when previewing your own modifications, you only need to run: SVN diff, which will call Vimdiff to show the diff comparison.
Two. Use Meld for SVN diff comparison:
Meld is a GUI text comparison tool that works much better than SvN's own diff tool. How do I use meld instead of SVN's own diff? Here's how:
1. Install the Meld
2. Edit the config file in the ~/.subversion directory and assign the meld to Diff-cmd as follows:
[Plain]View Plaincopy
- # # # Set Diff-cmd to the absolute path of your ' diff ' program.
- # # # This would override the Compile-time default, which is to use
- # # # Subversion ' s internal diffimplementation.
- Diff-cmd = Meld
[Go]svn diff tool