问题
I want to configure SVN command line client SlikSVN with Beyond Compare 3 as external diff and merge tool. How to do this?
回答1:
Add
Beyond Compare 3
folder to WindowsPATH
. If you don't know how check this answer - just replacePython
path withBeyond Compare 3
path.In
Beyond Compare 3
folder createbcomp-diff.bat
file:@ECHO OFF SET DIFF="bcomp.exe" SET LEFT=%6 SET RIGHT=%7 %DIFF% %LEFT% %RIGHT%
In
Beyond Compare 3
folder createbcomp-merge.bat
file:@ECHO OFF SET DIFF3=BComp.exe SET BASE=%1 SET THEIRS=%2 SET MINE=%3 SET MERGED=%4 REM left MINE REM center BASE REM right THEIRS %DIFF3% %MINE% %THEIRS% %BASE% %MERGED%
Now we need to edit
SlikSVN
config file. On Windows 7 it is located in%USERPROFILE%\AppData\Roaming\Subversion
(source). Just paste this into Windows Explorer address bar and editconfig
file.In
[helpers]
section ofconfig
file add/modify as below:diff-cmd = bcomp-diff.bat merge-tool-cmd = bcomp-merge.bat
Restart
cmd.exe
so thatPATH
windows variable will be reloaded.You're done! Try
svn diff
inside your repository and it should runBeyond Compare 3
.
I've made a gist with above batch files.
Batch files are based on this website.
来源:https://stackoverflow.com/questions/19602729/how-to-use-beyond-compare-3-as-external-svn-sliksvn-merge-and-diff-tool-on-win