external diff tool (Beyond Compare) not working with git cola

1,251 views
Skip to first unread message

Greg

unread,
Nov 9, 2010, 3:05:00 AM11/9/10
to git-cola
Hi,

In Windows, I use Beyond Compare as my differencing tool. I have it
set up as diff.tool and merge.tool and it works great from command
line (msysgit bash)

My config looks like this:
diff.tool=bc3
difftool.bc3.cmd="D:/Program Files (x86)/Beyond Compare 3/BComp.exe"
"$LOCAL" "$REMOTE"
difftool.prompt=false
merge.tool=bc3
mergetool.bc3.cmd="D:/Program Files (x86)/Beyond Compare 3/BComp.exe"
"$LOCAL" "$REMOTE" "$BASE" "$MERGED"
mergetool.bc3.trustexitcode=true
mergetool.bc3.keepbackup=false

In git cola (awesome piece of software by the way) I've got Diff Tool
and Merge Tool set to 'bc3'.
Whenever I try a diff, a command shell executes opens on git.exe for a
few seconds then closes. The 'Command Output' window doesn't show any
activity for this action either.

What am I doing wrong?

Regards,
Greg

David Aguilar

unread,
Mar 16, 2011, 3:24:42 AM3/16/11
to Greg, git-...@googlegroups.com

Hmm it's a little odd that it works fine interactively but fails
when inside cola.

What version of git do you have?

If you have a modern git:

git-cola has historically shipped a copy of git-difftool so that
it can work with git < v1.6.3. If you find the bin/git-difftool
script in *git-cola's* installation directory you can try moving
it to a "backup" directory and see if it behaves better using
the stock version from git.

BTW, "bc3" is being added as an officially supported diff/merge
tool. That work is already in git's "next" branch
(maybe you already know about it?)

So at one point you'll probably want to undefine the *.bc3.*
configuration variables. If you're feeling lucky you can
grab git-mergetool--lib from git's next branch and copy it to
where your current one is installed since that one natively
understands bc3.

I'm really not sure why it would fail via the GUI and work okay
in git bash. My experience, though, has been that going through
the windows shell to execute something in the background is
a little tricky. I wish it weren't that way.

I think the "launch this in the background code" is in
cola/utils.py. Maybe it's wrong? I admit that Windows
often confuses me and isn't my primary platform so sometimes I
use unixisms that don't work on a windows python.

Let me know how it goes, hopefully we can figure it out.
Cheers,
--
David

Greg Mountford

unread,
Mar 16, 2011, 6:21:15 AM3/16/11
to David Aguilar, git-...@googlegroups.com
Hi David,

I've got git version 1.7.3.1.msysgit.0 and cola version 1.4.3. I tried
removing the git-difftool script from cola, but no change :(
I don't know python at all to check the scripts - but I see that all
windows references are win32 and I'm running XP x64 and 7 x64, so
maybe that's part of my problem?

I'm not feeling lucky enough to pull down the 'next' mergetool lib
though - but thanks for the info, I never knew that was in the
pipeline.

Cheers,
Greg

David Aguilar

unread,
Mar 19, 2011, 10:50:14 PM3/19/11
to Greg Mountford, git-...@googlegroups.com
On Wed, Mar 16, 2011 at 12:21:15PM +0200, Greg Mountford wrote:
> Hi David,
>
> I've got git version 1.7.3.1.msysgit.0 and cola version 1.4.3. I tried
> removing the git-difftool script from cola, but no change :(
> I don't know python at all to check the scripts - but I see that all
> windows references are win32 and I'm running XP x64 and 7 x64, so
> maybe that's part of my problem?
>
> I'm not feeling lucky enough to pull down the 'next' mergetool lib
> though - but thanks for the info, I never knew that was in the
> pipeline.
>
> Cheers,
> Greg

I think I figured it out, finally.

git-cola had an old hack from the git 1.5(?) days where for
whatever reason I had to make paths after the '--' in git
commands absolute. I've been using a really old version of git
namely to make sure cola worked with older versions and didn't
strictly require newer git features.

I started getting the same difftool problem after upgrading to
the latest msysgit. After removing the workaround it started
working again :-)

I think that should fix it. If you could verify that it fixes
things for beyondcompare too then that'd be really helpful.
I tested kdiff3 with git 1.7.3.1.msysgit.0 Just launch cola
from its git repo using 'win32/cola'.

The next windows release of git-cola will stop shipping
git-difftool which means windows git-cola now requires
git >= 1.6.3. It'll also contain this bugfix.

https://github.com/davvid/git-cola/commit/a2e46a327fa3658cdbaf934884f3b784970b09c2
--
David

Reply all
Reply to author
Forward
0 new messages