If you use Svn in Ubuntu, you should know that the default diff tool is quite difficult to use. Although colordiff can be used to replace diff, it is better to use bcompare. Can we use beyond compare as its default comparison tool? Of course!
1. Download and install beyond compare. You can download the Linux version from the following website:
Http://www.scootersoftware.com/download.php
2. Install SVN
3. Go to the. Subversion folder and create two new. Sh files.
Bc2.sh
#!/bin/sh# Configure your favorite diff program here.DIFF=bcompare# Subversion provides the paths we need as the sixth and seventh # parameters.LEFT=${6}RIGHT=${7}# Call the diff command (change the following line to make sense for# your merge program).$DIFF --left $LEFT --right $RIGHT# Return an errorcode of 0 if no differences were detected, 1 if some were.# Any other errorcode will be treated as fatal.
Bc3.sh
#!/bin/sh# Configure your favorite diff3/merge program here.DIFF3=bcompare# Subversion provides the paths we need as the ninth, tenth, and eleventh # parameters.MINE=${9}OLDER=${10}YOURS=${11}# Call the merge command (change the following line to make sense for# your merge program).$DIFF3 --older $OLDER --mine $MINE --yours $YOURS# After performing the merge, this script needs to print the contents# of the merged file to stdout. Do that in whatever way you see fit.# Return an errorcode of 0 on successful merge, 1 if unresolved conflicts# remain in the result. Any other errorcode will be treated as fatal.
Change the two batch files to the executable status.
4. Modify the. Subversion/config file.
Add the following two sentences to [helpers ]:
Diff-cmd =/home/XXX/. Subversion/bc2.sh
Diff3-cmd =/home/XXX/. Subversion/bc3.sh
OK
Of course, you can also change bcompare to another comparison tool, such as meld.