title: Using WinMerge with Bazaar
body: <p>I searched a lot, found that some people claimed they did that, but I can't make it to work.</p>
  
  <p>How to you use WinMerge, my favorite diff tool on Windows, with Bazaar?</p>
  
  <p>I know difftools plugin (shipped with Bazaar) handles this but the controller.py file doesn't list it, and I fail to see where to specify a path. Looks like it searches in PATH variable, and reports <em>bzr: ERROR: Cannot find 'winmerge' in</em> (long list of paths).
  I tried to put a .cmd file, then a shortcut to WinMergeU.exe in Bazaar's directory, renaming accordingly (winmerge.cmd, winmerge.lnk) the <code>register_diff_tool</code> parameter. No more error, but nothing is launched...</p>
  
  <p>So, does somebody has any success using WinMerge (or perhaps some other Windows tool) with Bazaar?</p>
  
  <p>I would be interested to use it with extmerge plugin too...</p>
  
  <hr>
  
  <p><strong>EDIT</strong> After the first two answers, I tried some variants which I list here for reference. None worked:</p>
  
  <pre><code># As suggested:
  # Bad: bzr: ERROR: [Errno 22] Invalid argument: 'c:\\docume~1\\philho\\locals~1\\temp\\bzr_C:/Program Files/_Text/WinMerge/WinMergeU.exeh7angm.log'
  wdiff = diff --using "C:/Program Files/_Text/WinMerge/WinMergeU.exe"
  # Bad: bzr: ERROR: Cannot find 'C:Progra~1_TextWinMergeWinMergeU.exe' in &lt;PATH&gt;
  wdiff = diff --using C:\Progra~1\_Text\WinMerge\WinMergeU.exe
  
  # Variants:
  # Bad: bzr: ERROR: [Errno 22] Invalid argument: 'c:\\docume~1\\philho\\locals~1\\temp\\bzr_C:/Progra~1/_Text/WinMerge/WinMergeU.exejuttft.log'
  wdiff = diff --using C:/Progra~1/_Text/WinMerge/WinMergeU.exe
  # Bad: bzr: ERROR: [Errno 22] Invalid argument: 'c:\\docume~1\\philho\\locals~1\\temp\\bzr_C:\\Program Files\\_Text\\WinMerge\\WinMergeU.exehpabjl.log'
  wdiff = diff --using "C:\\Program Files\\_Text\\WinMerge\\WinMergeU.exe"
  # Bad: bzr: ERROR: [Errno 22] Invalid argument: 'c:\\docume~1\\philho\\locals~1\\temp\\bzr_C:\\Progra~1\\_Text\\WinMerge\\WinMergeU.exe4gi5or.log'
  wdiff = diff --using C:\\Progra~1\\_Text\\WinMerge\\WinMergeU.exe
  </code></pre>
  
  <p>Using:</p>
  
  <pre><code>Bazaar (bzr) 1.11
    Python interpreter: C:\Program Files\_Dev\Bazaar\python25.dll 2.5.2
  </code></pre>
  
  <p>Actually, the awful (and embarrassing) truth is that it appears that one of my earlier attempts worked, but I saw nothing... because I was testing against a committed file! I suppose I was expecting that by default it compared last two revisions or something.</p>
  
  <p>Anyway, as I wrote in a comment, I don't want to put WinMerge directory in my already too long path, so I took at middle road, making a command file and putting it in Bazaar's directory which is already in the path.
  At least it works, and I can easily add parameters if needed.</p>
  
  <pre><code>[ALIASES]
  wdiff = diff --using winmerge.cmd
  
  # winmerge.cmd contains:
  "C:\Program Files\_Text\WinMerge\WinMergeU.exe" %1 %2
  </code></pre>
  
  <p>Maybe I should put that as solution in the thread, although it lacks elegance.</p>
  
  <p>For the record, while we are on the topic of external tools, I also added to bazaar.conf:</p>
  
  <pre><code>editor = C:/Program Files/_Text/SciTE/SciTE.exe
  </code></pre>
  
  <p>It is used by commit (without -m option), for example.</p>
  
  <p>Next step: extmerge. Looking closer, it doesn't seem WinMerge is usable there, not having 3-way merge. I might use Perforce's merge, it is free and I am used to it.<br>
  Just a note for those as confused as me: extmerge isn't a GUI replacement for merge. If you run it, it will report no conflict, even if merge reports them. Actually, you have to run merge first, then extmerge to use the generated/altered files and do the job...<br>
  If you want to use WinMerge anyway, perhaps to compare OTHER to THIS, you can use:</p>
  
  <pre><code>external_merge = "C:/Program Files/_Text/WinMerge/WinMergeU.exe %o %t %r"
  </code></pre>
  
  <p>I hope my attempts/remarks here will be useful to some other people... :-)</p>
  
  <p><strong>[UPDATE]</strong><br>
  Oookaaay!<br>
  So I was confused! A message in the Bazaar mailing list enlightened my poor soul:
  "<em>You know that bzr also provides diff --using, right?  You prefer the version in difftools?</em>" -- Aaron Bentley, 2009-04-03 in <em>Re: difftools, ‘bzr diff --using footool’, and ‘diffuse’</em></p>
  
  <p>Aargh! No, I didn't know that.<br>
  I removed difftools plugin, edited my line to:</p>
  
  <pre><code>wdiff = diff --using "C:/Program Files/_Text/WinMerge/WinMergeU.exe"
  </code></pre>
  
  <p>and it worked perfectly fine, out of the box! I am not sure why this difftools plugin isn't marked as obsolete.</p>
  
  <p>I leave this question as a reference in case other newbies like me are confused too. And I can at least elect an answer. Thanks!</p>