git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Adding Beyond Compare as a merge tool, was: Re: What's cooking in git.git (Feb 2011, #05; Wed, 23)

From
Chris Packham <judge.packham@gmail.com>
Date
Feb 27, 2011, 05:38 UTC
Message-ID
<4D69E355.7010104@gmail.com>
In-Reply-To
<4D68D4FA.7090500@gmail.com>
On 26/02/11 23:24, Sebastian Schuberth wrote:
Show 17 quoted lines
> On 24.02.2011 00:26, Junio C Hamano wrote:
> 
>> * cp/mergetool-beyondcompare (2011-02-18) 1 commit
>>   - mergetool--lib: add support for beyond compare
> 
> Sorry for not responding earlier to this, but problems at my news
> provider seem to have swallowed mails from several days, including the
> original post of
> 
> http://marc.info/?l=git&m=129801656713478&w=2
> 
> A while ago, I had already proposed
> 
> http://marc.info/?l=git&m=129007741814521&w=2
> 
> I'm not entirely sure why it was ignored in the end, probably I did not
> report back to have tested it in Linux.
Sorry that I missed it (I didn't really look too hard).
Show 5 quoted lines
> 
> A few things that I like better in my patch than in Chris':
> 
> - Beyond Compare is added as "bc3" instead of "bcompare", which is both
> shorter and indicates that only version 3, not version 2, is supported.

v2 isn't natively available for linux, although it works quite well under wine. Either way you're quite correct that v2 is not much use as a 3-way merge tool. Trying to indicate v3 only make sense to me (at least until they release a v4 :)

> - Chris seems to be missing the patch to git-gui/lib/mergetool.tcl

Didn't know to add it, thanks for pointing it out. If my patch get's picked up I'll include it in the next round.

Show 5 quoted lines
> - To the best of my knownledge, the Beyond Compare executable is called
> "BCompare" (note the case), that means even with the merge tool named
> "bcompare" a translation step in git-mergetool--lib.sh should by
> required (as done in my patch). Chris, as you seem to have tested ion
> Linux, could you shed a light on  this?
In linux it's bcompare, although BCompare is the eventual executable

chrisp@laptop:~> rpm -q --filesbypkg bcompare bcompare /usr/bin/bcompare bcompare /usr/lib/beyondcompare/BCompare

Unfortunately /usr/bin/bcompare is a little more involved than a symlink so for linux we need to call bcompare. Do we have a nice way of handling this? We could just treat them completely separate but that seems a but like sweeping the problem under the carpet.

> - Using dashes for the options to Beyond Compare is fine on Windows,

Good to hear. I was meaning to fire up a vbox windows XP image to double check but you've saved me the hassle.

Show 8 quoted lines
> however, I believe the order of the files is wrong, although that might
> be a bit subjective. For a 3-way merge the syntax is
> 
> BCompare.exe C:\Left.ext C:\Right.ext C:\Center.ext
> 
> So the file that should go to the center panel is specified last. AFAIK,
> all other merge tools are called such that $BASE goes to the center.
> This is why my patch specifies $BASE last.

I actually prefer base on the left a-la kdiff3 and araxis (and from my previous life as a clearcase user). I've since found that with beyond compare it is a pain to take changes from the center version so I agree with your suggestion. We should probably make use of the -title options to remove ambiguity.

Show 5 quoted lines
> Any more opinions? Chris, in case you'd agree to prefer my patch, I'd be
> very grateful if you could test it on Linux.
> 
> For your convenience, I've rebased onto the current master and attached
> the patch files.

I'll give it a whirl when I get a chance. I suspect I'll need to handle the BCompare/bcompare thing but that's not a huge issue.

Previous: Sebastian SchuberthNext: Junio C Hamano
Message 42 of 46 in “What's cooking in git.git (Feb 2011, #05; Wed, 23)”
  1. Junio C HamanoFeb 23, 2011
  2. ab/i18n (What's cooking in git.git (Feb 2011, #05; Wed, 23))Jonathan Nieder, Feb 23, 2011
  3. Junio C HamanoFeb 24, 2011
  4. Ævar Arnfjörð BjarmasonFeb 24, 2011
  5. Jonathan NiederFeb 24, 2011
  6. Ævar Arnfjörð BjarmasonFeb 24, 2011
  7. Jonathan NiederFeb 24, 2011
  8. Jonathan NiederFeb 24, 2011
  9. Ævar Arnfjörð BjarmasonFeb 25, 2011
  10. Jonathan NiederFeb 26, 2011
  11. Jonathan NiederFeb 24, 2011
  12. Erik Faye-LundFeb 24, 2011
  13. Jonathan NiederFeb 24, 2011
  14. Junio C HamanoFeb 24, 2011
  15. Ævar Arnfjörð BjarmasonFeb 24, 2011
  16. Johan HerlandFeb 23, 2011
  17. Junio C HamanoFeb 24, 2011
  18. Johan HerlandFeb 24, 2011
  19. Ævar Arnfjörð BjarmasonFeb 24, 2011
  20. Junio C HamanoFeb 24, 2011
  21. Ævar Arnfjörð BjarmasonFeb 24, 2011
  22. Junio C HamanoFeb 24, 2011
  23. Ævar Arnfjörð BjarmasonFeb 24, 2011
  24. Erik Faye-LundFeb 24, 2011
  25. Ævar Arnfjörð BjarmasonFeb 24, 2011
  26. Jonathan NiederFeb 24, 2011
  27. Johannes SchindelinFeb 25, 2011
  28. Kirill SmelkovFeb 25, 2011
  29. Johannes SchindelinFeb 25, 2011
  30. Kirill SmelkovFeb 25, 2011
  31. Johannes SchindelinFeb 25, 2011
  32. Kirill SmelkovFeb 26, 2011
  33. Kirill SmelkovFeb 26, 2011
  34. cross-compiling msys-1.0.dll, was Re: What's cooking in git.git (Feb 2011, #05; Wed, 23)Johannes Schindelin, Feb 26, 2011
  35. Kirill SmelkovMar 12, 2011
  36. Johannes SchindelinMar 12, 2011
  37. Johannes SchindelinFeb 27, 2011
  38. Kirill SmelkovMar 12, 2011
  39. Adding Beyond Compare as a merge tool, was: Re: What's cooking in git.git (Feb 2011, #05; Wed, 23)Sebastian Schuberth, Feb 26, 2011
  40. Junio C HamanoFeb 26, 2011
  41. Sebastian SchuberthFeb 26, 2011
  42. Chris PackhamFeb 27, 2011
  43. Junio C HamanoFeb 27, 2011
  44. Sebastian SchuberthFeb 27, 2011
  45. Sebastian SchuberthFeb 27, 2011
  46. Sebastian SchuberthFeb 27, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.