70

When you install winmerge after TortoiseSVN it gives you the option of associating winmerge with Tortoise. But if we install TortoiseSVN after winmerge how can we associate Winmerge to be used instead of Tortoise default diff viewer.

Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214

3 Answers3

99

You can open the TortoiseSVN settings and manually enter it:

enter image description here

My command line from the screenshot above is:

C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -ub -dl %bname -dr %yname %base %mine

If you install TortoiseSVN after WinMerge, probably the easiest way would be to uninstall and re-install WinMerge again.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 5
    I like to see the changed version in the left pane, so this is mine: `C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -ub -dl %yname -dr %bname %mine %base` – mattalxndr Mar 25 '13 at 15:31
  • 2
    I know the installer sets this options, but the [official documenation](http://manual.winmerge.org/Command_line.html), doesn't mention the `-ub` option. Looking at `MergeCmdLineInfo.cpp`, I found out that this means `-ul` and `-ur` combined. Source code says this option is deprecated and only `-u` works too. – ventiseis Jan 17 '17 at 21:54
  • 2
    I also added a `/wl` since I don't see why i would want/allow to edit the base here. The [docs](http://manual.winmerge.org/Command_line.html) only use windows-style switched (`/` not `-`) so i went with that but i guess both work. – Adam Jan 20 '17 at 11:24
26

You can also use WinMerge for merging changes. In the settings window (as above) under Merge Tool, enter:

32-bit os

C:\Program Files\WinMerge\WinMergeU.exe -e -x -ub -dl %tname -dr %yname %theirs %mine

64-bit os

C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -ub -dl %tname -dr %yname %theirs %mine

Then you'll get the remote file in the left pane, your local (changed) file in the right pane.

turbanoff
  • 2,439
  • 6
  • 42
  • 99
tobylaroni
  • 843
  • 8
  • 16
  • Actually, I think it works better when you resolve it afterwards if you use the "wl" (read-only left pane) and %merged for output path. I use the following: `C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -ub -dl %tname -wl -dr %yname %theirs %mine %merged` – binarez Mar 09 '17 at 15:51
21

As of 2017, command line parameters as slightly changed. You should use (for 64-bit OS):

Diff Viewer

C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -u -wl -dl %bname -dr %yname %base %mine

With:

  • -e enables you to close WinMerge with a single Esc key press.
  • -x closes WinMerge (after displaying an information dialog) when you start a comparison of identical files.
  • -u prevents WinMerge from adding either path (left or right) to the Most Recently Used (MRU) list.
  • -wl opens the left side as read-only.
  • -dl %bname specifies a description of the original file in the left side title bar.
  • -dr %yname specifies a description of your own file in the right side title bar.
  • %base specifies the left side file with the original file.
  • %mine specifies the right side file with your own file.

Merge Tool

C:\Program Files (x86)\WinMerge\WinMergeU.exe -e -x -u -wl -dl %tname -dr %yname %theirs %mine %merged

With the same options as above except:

  • -dl %tname specifies a description of the repository file in the left side title bar.
  • %theirs specifies the left side file with the repository file.
  • %merged specifies the conflicted file, the result of the merge operation.
Shiva127
  • 2,413
  • 1
  • 23
  • 27