Bad setup for Beyond Compare tool in Git Gui

474 views
Skip to first unread message

Juraj Vančo

unread,
Jan 10, 2013, 3:06:44 AM1/10/13
to msy...@googlegroups.com
Hi guys,

the Git Gui's Beyond Compare launcher has a bug. If I want to run mergetool, it runs my Beyond Compare for example:
"c:\program files\beyond compare 3\bcomp.exe" ./setup2.LOCAL ./setup2.REMOTE ./setup2.BASE -mergeoutput=\"setup2\"

which is bad, resulting in bad merge output directory. It should be:
"c:\program files\beyond compare 3\bcomp.exe" ./setup2.LOCAL ./setup2.REMOTE ./setup2.BASE -mergeoutput="setup2"

Reproducible: always
git version 1.8.0.msysgit.0

Pat Thoyts

unread,
Feb 22, 2013, 2:56:51 PM2/22/13
to war...@warrenfalk.com, msy...@googlegroups.com, patt...@users.sourceforge.net
On 22 February 2013 17:28, <war...@warrenfalk.com> wrote:
> According to the "SubmittingPatches" document of the git repository, the
> offending file is in the git-gui subsystem which has its own maintainer (Pat
> Thoyts). Attached is a patch for the git-gui project which fixes the issue.
>
> I've copied Pat. If there's an official way these patches should be
> submitted, let me know.

inline patches are best as this allows them to be commented on easily.
It's also best to use git-format-patch as this allows you to create a
proper commit message with your email as the author and signoff and so
on. However, this looks ok to me an I can paste in the author details
manually. What we need in the commit message is _why_ this is
necessary. If the problem this patch solves is stated clearly then it
makes it simpler to try and verify this patch actually fixes the
fault. Obviously here you've done that with the initail email -
however, in trying to validate this I installed a copy of Beyond
Compare and configured a repository to use it and arranged to have a
merge to look at. Right clicking and selecting "Run Merge Tool"
successfully launches this tool in both your patched version and the
current non-patched version. So what conditions are required to show
the fault? I tried a repository with spaces in the path which is a
common problem but this was ok too. In my testing I'm using Win7 x64
so the beyond compare tool is in Program Files (x86). I configured the
tool using:

git config merge.tool bc3
git config mergetool.bc3.path "C:\Program Files (x86)\Beyond Compare
3\BCompare.exe"

So - how to test? Otherwise this looks ok. The primary git-gui repo is
at http://repo.or.cz/r/git-gui.git by the way. This is merged into git
from time to time.

diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl
index 3c8e73b..120bc40 100644
--- a/lib/mergetool.tcl
+++ b/lib/mergetool.tcl
@@ -189,9 +189,9 @@ proc merge_resolve_tool2 {} {
}
bc3 {
if {$base_stage ne {}} {
- set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE"
-mergeoutput="$MERGED"]
+ set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE"
"-mergeoutput=$MERGED"]
} else {
- set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE"
-mergeoutput="$MERGED"]
+ set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE"
"-mergeoutput=$MERGED"]
}
}
ecmerge {

Warren Falk

unread,
Feb 22, 2013, 3:01:56 PM2/22/13
to Pat Thoyts, msy...@googlegroups.com, patt...@users.sourceforge.net
Thank you.

Sorry, the problem occurs when you save the merged output.  Without the fix, beyond compare saves it to the wrong location.

e.g. if you had a respository in C:\code\myrepo and a merge output of C:\code\myrepo\source\myfile.c beyond compare appears to save the file fine but is actually saving to a folder off the filesystem root (C:\source\myfile.c) which is, of course, useless and results in no merge actually being done.

Pat Thoyts

unread,
Feb 22, 2013, 3:14:02 PM2/22/13
to Warren Falk, msy...@googlegroups.com, patt...@users.sourceforge.net
On 22 February 2013 20:01, Warren Falk <war...@warrenfalk.com> wrote:
> Thank you.
>
> Sorry, the problem occurs when you save the merged output. Without the fix,
> beyond compare saves it to the wrong location.
>
> e.g. if you had a respository in C:\code\myrepo and a merge output of
> C:\code\myrepo\source\myfile.c beyond compare appears to save the file fine
> but is actually saving to a folder off the filesystem root
> (C:\source\myfile.c) which is, of course, useless and results in no merge
> actually being done.
>
>
Ah ok - I didn't go along that far as I keep this directory around for
testing merge conflicts.
Patch applied - thank you.

Pat Thoyts.
Reply all
Reply to author
Forward
0 new messages