SVN diff Replacement tool
One. Replace SVN diff with Vimdiff:
For most Linux developers, Vimdiff's presentation of file differences is obviously much more intuitive than SVN diff.
So can we use Vimdiff instead of SVN diff? Fortunately, SVN considered this and supported Third-party programs as contrast differences. Now all we need is 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 that I name as Mydiff, store it under/usr/bin, and enter the following code:
#!/bin/sh
# Specifies the path of the Vimdiff.
diff= "/usr/bin/vimdiff"
# SVN provides sixth and seventh parameters as the base and local most recent text as input
left=${6}
right=${7}
#调用vimdiff做比较
$DIFF $LEFT $RIGHT
Then give the file executable permission: chmod +x/usr/bin/mydiff
2, configure the personal home directory svn configuration file: ~/.subversion/config, positioning and configuration for the following:
[Helpers]
Save exit and you can use it.
This way, when you preview your changes, you only need to run: SVN diff, which calls 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 to use Meld instead of the diff with svn. The method is as follows:
1. Install Meld
2. Edit the config file in the ~/.subversion directory and assign the meld value to Diff-cmd as follows:
### Set diff-cmd to the absolute path of your ' diff ' program.
### This'll override the Compile-time default, which is to use
### Subversion ' s internal diffimplementation .
Diff-cmd = Meld