Linux/unix A visualization tool to replace SVN diff __linux

Source: Internet
Author: User
Tags diff svn
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






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.