[Turn]SVN diff replacement tool

Source: Internet
Author: User

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
    1. #!/bin/sh
    2. # Specifies the path of the Vimdiff.
    3. diff= "/usr/bin/vimdiff"
    4. # SVN provides sixth and seventh parameters as input for base and local latest text
    5. LEFT=${6}
    6. RIGHT=${7}
    7. #调用vimdiff做比较
    8. $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
    1. [Helpers]
    2. 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
      1. # # # Set Diff-cmd to the absolute path of your ' diff ' program.
      2. # # # This would override the Compile-time default, which is to use
      3. # # # Subversion ' s internal diffimplementation.
      4. Diff-cmd = Meld

[Go]svn diff tool

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.