Getting Araxis Merge to run

236 views
Skip to first unread message

AndreasWallner

unread,
Apr 6, 2009, 9:54:35 PM4/6/09
to msysGit
Hi,

I tried to get Araxis Merge to work with msysgit, but I encountered a
problem. I wasn't able to get the config file entry right...

[merge]
tool = araxis
[mergetool "araxis"]
cmd = "C:/Programme/Araxis/Araxis Merge/compare.exe" /wait /3 /a3 /
title1:"local" /title2:"remote" /title3:"base" "$LOCAL" "$REMOTE"
"$BASE" "$MERGED"
trustExitCode = true

Each time I try to use araxis, msysgit complains not being able to
find the path, as it does not read over the space character in the
path. Do I do something wrong, or is this not supported at the moment?

I also found araxis in the TCL script for mergetool, but It seems that
it is only supported on linux?
What would I have to do to make it work on Windows too (Uses the same
command line, the "only" thing should be, telling git where it is, and
that it is available to use)

Regards,
Andreas Wallner

Johannes Schindelin

unread,
Apr 7, 2009, 8:48:14 AM4/7/09
to AndreasWallner, msysGit
Hi,

On Mon, 6 Apr 2009, AndreasWallner wrote:

> I tried to get Araxis Merge to work with msysgit, but I encountered a
> problem. I wasn't able to get the config file entry right...
>
> [merge]
> tool = araxis
> [mergetool "araxis"]
> cmd = "C:/Programme/Araxis/Araxis Merge/compare.exe" /wait /3 /a3 /
> title1:"local" /title2:"remote" /title3:"base" "$LOCAL" "$REMOTE"
> "$BASE" "$MERGED"

This is actually an entry in our issue tracker: "/bla:x" is munged by
MSys.

So you will have to use double slashes: "//wait". Or maybe Araxis Merge
is clever enough to adher to the standard in the rest of the world:
"-wait".

Hth,
Dscho

AndreasWallner

unread,
Apr 7, 2009, 11:59:42 AM4/7/09
to msysGit
Hi,

On Apr 7, 2:48 pm, Johannes Schindelin <Johannes.Schinde...@gmx.de>
wrote:
> This is actually an entry in our issue tracker: "/bla:x" is munged by
> MSys.
>
> So you will have to use double slashes: "//wait".  Or maybe Araxis Merge
> is clever enough to adher to the standard in the rest of the world:
> "-wait".

Thanks for the information, but as I wrote above, also the space in
the path to the merge tool seems to be a problem...
After creating a conflict and trying git mergetool, I get this output:

Normal merge conflict for 'hello.txt':
{local}: modified
{remote}: modified
Hit return to start merge resolution tool (araxis):
C:\Programme\Git/libexec/git-core/git-mergetool: line 275: C:/
Programme/Araxis/Araxis: No such file or directory
merge of hello.txt failed

I did change the slashes before trying this again.

And my second question: As Araxis support (for 2 and 3 way merge)
seems to be in git mergetool, why isn't it available on windows (Is
there a problem, or is it just that nobody had time yet?)

Regards,
Andreas

Heiko Voigt

unread,
Apr 7, 2009, 12:26:59 PM4/7/09
to AndreasWallner, msysGit
On Tue, Apr 07, 2009 at 08:59:42AM -0700, AndreasWallner wrote:
> Thanks for the information, but as I wrote above, also the space in
> the path to the merge tool seems to be a problem...
> After creating a conflict and trying git mergetool, I get this output:
>
> Normal merge conflict for 'hello.txt':
> {local}: modified
> {remote}: modified
> Hit return to start merge resolution tool (araxis):
> C:\Programme\Git/libexec/git-core/git-mergetool: line 275: C:/
> Programme/Araxis/Araxis: No such file or directory
> merge of hello.txt failed

Adding "C:\Programme\Araxis" to your PATH environment variable and just
using araxis in the cmd should get you going. I was never able to find
the correct escapes for such a setup. Are there any?

cheers Heiko

Johannes Schindelin

unread,
Apr 7, 2009, 12:50:40 PM4/7/09
to AndreasWallner, msysGit
Hi,

On Tue, 7 Apr 2009, AndreasWallner wrote:

> On Apr 7, 2:48 pm, Johannes Schindelin <Johannes.Schinde...@gmx.de>
> wrote:
> > This is actually an entry in our issue tracker: "/bla:x" is munged by
> > MSys.
> >
> > So you will have to use double slashes: "//wait".  Or maybe Araxis
> > Merge is clever enough to adher to the standard in the rest of the
> > world: "-wait".
>
> Thanks for the information, but as I wrote above, also the space in the
> path to the merge tool seems to be a problem... After creating a
> conflict and trying git mergetool, I get this output:
>
> Normal merge conflict for 'hello.txt':
> {local}: modified
> {remote}: modified
> Hit return to start merge resolution tool (araxis):
> C:\Programme\Git/libexec/git-core/git-mergetool: line 275: C:/
> Programme/Araxis/Araxis: No such file or directory
> merge of hello.txt failed

As a workaround, you can use the "shortnames" that you can see by

(cd /c/Programme/Araxis && cmd /c dir //x)

> I did change the slashes before trying this again.
>
> And my second question: As Araxis support (for 2 and 3 way merge)
> seems to be in git mergetool, why isn't it available on windows (Is
> there a problem, or is it just that nobody had time yet?)

Hmm...

$ git grep -i araxis git-mergetool.sh

just shows empty output in git.git proper. So where did you see it
supported?

Ciao,
Dscho

Bosko Ivanisevic

unread,
Apr 7, 2009, 1:08:39 PM4/7/09
to msysGit
Have you tried to escape space character:

cmd = "C:/Programme/Araxis/Araxis\ Merge/compare.exe"

(backslash before space)?

On Apr 7, 5:59 pm, AndreasWallner <Andreas.Wallner.et...@fh-

AndreasWallner

unread,
Apr 7, 2009, 3:27:15 PM4/7/09
to msysGit
Escaping the space that way gives:

fatal: bad config file line 8 in c:/Dokumente und Einstellungen/
uhu01/.gitconfig

Regards,
Andreas Wallner

AndreasWallner

unread,
Apr 7, 2009, 3:27:49 PM4/7/09
to msysGit
I found that page here: http://kerneltrap.org/mailarchive/git/2008/8/30/3141054
But after investigation again I did see it was for git-gui...

But...why is is not possible (on windows) to call non-command-line
merge tools?

And...Is it possible to do a 2-way merge with a custom configured
tool?

Regards,
Andreas Wallner



On Apr 7, 6:50 pm, Johannes Schindelin <Johannes.Schinde...@gmx.de>

Markus Heidelberg

unread,
Apr 7, 2009, 3:38:27 PM4/7/09
to msy...@googlegroups.com, Andreas.Wa...@fh-joanneum.at
AndreasWallner, 07.04.2009:

> But...why is is not possible (on windows) to call non-command-line
> merge tools?

Who says this? I can run gvimdiff and kdiff3 for example from both
git-gui and git-mergetool under Windows.

> And...Is it possible to do a 2-way merge with a custom configured
> tool?

If you get conflicts after a merge, you want 3-way.
Or are looking at something like git-difftool, which is making its way
out of contrib/ at the moment?

Markus

Markus Heidelberg

unread,
Apr 7, 2009, 3:44:30 PM4/7/09
to msy...@googlegroups.com, Andreas.Wa...@fh-joanneum.at
Markus Heidelberg, 07.04.2009:
>
> AndreasWallner, 07.04.2009:

> > And...Is it possible to do a 2-way merge with a custom configured
> > tool?
>
> If you get conflicts after a merge, you want 3-way.
> Or are looking at something like git-difftool, which is making its way
> out of contrib/ at the moment?

I forgot to answer your question. Yes, of course it is possible. Just
don't pass $BASE to your custom merge tool.

Markus

AndreasWallner

unread,
Apr 7, 2009, 6:07:17 PM4/7/09
to msysGit
Thank you for your help...

Because of using e.g. kdiff3:
Excuse my comment, I had kdiff3 in the wrong path, so it didn't work.

Regards,
Andreas

Myagi

unread,
Apr 8, 2009, 12:43:11 PM4/8/09
to msysGit
Not sure if this help or even if it is "correct", it's just some hack
I did and it appeared to be working. (based on 1.6.1)

Something strange is going with how shell in windows deals with
certain command line args. araxis expects the -title params to come in
as -tit1e1:"blaha" or -tit1e1:'blaha' but I tried everything it just
didn't work from the shell script (but worked fine from DOS prompt),
it seems to split the args before araxis gets them, finally I skipped
the title params.

(Also note that the araxis version I tried does not use / for args,
even if the dialog says so, it only accepted - )

----------------------
--- a/git-mergetool.sh Sat Feb 28 03:08:08 2009 UTC
+++ b/git-mergetool.sh Fri Jan 9 23:56:09 2009 UTC
@@ -251,20 +251,6 @@
fi
status=$?
;;
- araxis)
- touch "$BACKUP"
- # something is utterly wrong with how shell passes args to
processes in windows, no combination of ' and "
- # will pass args correctly to araxis and -title1 params containing
spaces are impossible to use (same command
- # works when passed from a DOS prompt, so the issue must be with
shell)
- if base_present ; then
- #"$merge_tool_path" -wait -merge -3 -a1 -title1:"'$MERGED (Base)'" -
title2:"'$MERGED (Local)'" -title3:"'$MERGED (Remote)'" "$BASE"
"$LOCAL" "$REMOTE" "$MERGED"
- "$merge_tool_path" -wait -merge -3 -a1 "$BASE" "$LOCAL" "$REMOTE"
"$MERGED"
- else
- #"$merge_tool_path" -wait -2 -title1:"'$MERGED (Local)'" -
title2:"'$MERGED (Remote)'" "$LOCAL" "$REMOTE" "$MERGED"
- "$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" "$MERGED"
- fi
- check_unchanged
- ;;
*)
if test -n "$merge_tool_cmd"; then
if test "$merge_tool_trust_exit_code" = "false"; then
@@ -281,7 +267,6 @@
if test "$status" -ne 0; then
echo "merge of $MERGED failed" 1>&2
mv -- "$BACKUP" "$MERGED"
- cleanup_temp_files
exit 1
fi

@@ -332,7 +317,7 @@

valid_tool() {
case "$1" in
- kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff |
gvimdiff | ecmerge | araxis)
+ kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff |
gvimdiff | ecmerge)
;; # happy
*)
if ! valid_custom_tool "$1"; then

Myagi

unread,
Apr 8, 2009, 12:57:12 PM4/8/09
to msysGit
I should have added my config to the previous post

[merge]
tool = araxis
[mergetool "araxis"]
path = C:/Program Files/Araxis/Araxis Merge/Compare.exe
keepBackup = false
trustExitCode = false

Johannes Schindelin

unread,
Apr 16, 2009, 9:17:56 AM4/16/09
to Myagi, msysGit
Hi,

On Wed, 8 Apr 2009, Myagi wrote:

> Not sure if this help or even if it is "correct", it's just some hack I
> did and it appeared to be working. (based on 1.6.1)

Could you repost this with a proper commit message? (Maybe after skimming
/git/Documentation/SubmittingPatches?)

> ----------------------
> --- a/git-mergetool.sh Sat Feb 28 03:08:08 2009 UTC
> +++ b/git-mergetool.sh Fri Jan 9 23:56:09 2009 UTC
> @@ -251,20 +251,6 @@
> fi
> status=$?
> ;;
> - araxis)

There are a lot of "-" lines that I do not have... Did you post the
reverse patch?

Ciao,
Dscho

Myagi

unread,
Apr 16, 2009, 6:56:19 PM4/16/09
to msysGit
Sorry for questionable format, the problem is that I was just
experminting on the shell script in my git install dir, so I generated
the patch with araxis against a backup copy. Not really sure exactly
what araxis does I just browsed through the diff and it appeared
similar enough to a "normal" diff so I hoped for the best.

And yes, I have no idea how I missed it, but it got reversed in the
process :)

(Disclaimer: I'm not very experienced with git merging nor araxis
which is why I didn't make an all out 4msysgit patch from the start.)

Here's another attempt using git:

From: Myagi <snow...@gmail.com>
Subject: [PATCH] araxis added to git-mergetool

---
git-mergetool.sh | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -251,6 +251,20 @@ merge_file () {
fi
status=$?
;;
+ araxis)
+ touch "$BACKUP"
+ # something is utterly wrong with how shell passes args to
processes in windows, no combination of ' and "
+ # will pass args correctly to araxis and -title1 params containing
spaces are impossible to use (same command
+ # works when passed from a DOS prompt, so the issue must be with
shell)
+ if base_present ; then
+ #"$merge_tool_path" -wait -merge -3 -a1 -title1:"'$MERGED (Base)'" -
title2:"'$MERGED (Local)'" -title3:"'$MERGED (Remote)'" "$BASE"
"$LOCAL" "$REMOTE" "$MERGED"
+ "$merge_tool_path" -wait -merge -3 -a1 "$BASE" "$LOCAL" "$REMOTE"
"$MERGED"
+ else
+ #"$merge_tool_path" -wait -2 -title1:"'$MERGED (Local)'" -
title2:"'$MERGED (Remote)'" "$LOCAL" "$REMOTE" "$MERGED"
+ "$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" "$MERGED"
+ fi
+ check_unchanged
+ ;;
*)
if test -n "$merge_tool_cmd"; then
if test "$merge_tool_trust_exit_code" = "false"; then
@@ -267,6 +281,7 @@ merge_file () {
if test "$status" -ne 0; then
echo "merge of $MERGED failed" 1>&2
mv -- "$BACKUP" "$MERGED"
+ cleanup_temp_files
exit 1
fi

@@ -317,7 +332,7 @@ valid_custom_tool()

valid_tool() {
case "$1" in
- kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff |
gvimdiff | ecmerge)
+ kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff |
gvimdiff | ecmerge | araxis)
;; # happy
*)
if ! valid_custom_tool "$1"; then
--
1.6.1.9.g97c34

Reply all
Reply to author
Forward
0 new messages