Using DiffMerge as merging-gui for Subversion

Altes Gymnasium (Neuruppin), own Photo (by Christoph Burmeister)

Altes Gymnasium (Neuruppin), own Photo (by Christoph Burmeister)


For using DiffMerge as the merging-tools for Subversion, you need a wrapper. I found many wrapper-scripts for *ix-platforms, but non (working) for windows :-/ so here we go:

@ECHO OFF

REM Configure your favorite merge program here.
SET DIFF_EXEC="C:\dev\DiffMerge_3_3_2_1139_x86\sgdm.exe"

REM Get the paths provided by Subversion.
SET BASE=%1
SET THEIRS=%2
SET MINE=%3
SET MERGED=%4
SET WCPATH=%5

REM Call the merge command
%DIFF_EXEC% --nosplash --merge --title1="Incoming (THEIRS)"  --title2="Original (Merged)" --title3="Working Copy (Mine)" --result="%MERGED%" "%THEIRS%" "%BASE%" "%MINE%"

Now put this stuff into a script called „sgdm-svn-wrapper.bat“ and reference this via SVN_MERGE in your environment-variables. That’s it.

And the resulting gui after a merge-conflict has happened (via „svn merge“):
diffmerge_gui

Thanks to semicrazy 🙂 https://semicrazy.wordpress.com/2009/10/08/using-diffmerge-as-your-subversion-external-merge-tool/