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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/02/11 23:24, Sebastian Schuberth wrote:
> 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).

> 
> 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.

> - 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.

> 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.

> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]