{"thread":{"id":"19393","subject":"[PATCH] mergetool--lib: add support for araxis merge","startedAt":"2009-05-18T03:18:20Z","lastAt":"2009-05-23T14:29:49Z","messageCount":2,"participants":["David Aguilar","Markus Heidelberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114150","messageId":"1242616700-26022-1-git-send-email-davvid@gmail.com","threadId":"19393","inReplyTo":null,"subject":"[PATCH] mergetool--lib: add support for araxis merge","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-05-18T03:18:20Z","receivedAt":"2009-05-18T03:18:20Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Araxis merge is now a built-in diff/merge tool.\nThis adds araxis to git-completion and updates\nthe documentation as well.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nThis applies on top of the da/mergetool-lib branch\ncurrently in pu.\n\nThis is a rework of a patch to add araxis support\nto mergetool which originated on the msysgit list.\nThe commented-out \"-titleN:\" options were\nintentionally left out of this patch because\nno amount of shell-quoting could get it to work\nwhen the title contained spaces.\n\nhttp://groups.google.com/group/msysgit/browse_thread/thread/fa353fa2240594d7\n\n Documentation/git-difftool.txt         |    2 +-\n Documentation/git-mergetool.txt        |    2 +-\n Documentation/merge-config.txt         |    2 +-\n contrib/completion/git-completion.bash |    2 +-\n git-mergetool--lib.sh                  |   24 ++++++++++++++++++++++--\n 5 files changed, 26 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt\nindex 15b247b..96a6c51 100644\n--- a/Documentation/git-difftool.txt\n+++ b/Documentation/git-difftool.txt\n@@ -31,7 +31,7 @@ OPTIONS\n \tUse the diff tool specified by <tool>.\n \tValid merge tools are:\n \tkdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n-\tecmerge, diffuse and opendiff\n+\tecmerge, diffuse, opendiff and araxis.\n +\n If a diff tool is not specified, 'git-difftool'\n will use the configuration variable `diff.tool`.  If the\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex ff9700d..68ed6c0 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -27,7 +27,7 @@ OPTIONS\n \tUse the merge resolution program specified by <tool>.\n \tValid merge tools are:\n \tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,\n-\tdiffuse, tortoisemerge and opendiff\n+\tdiffuse, tortoisemerge, opendiff and araxis.\n +\n If a merge resolution program is not specified, 'git-mergetool'\n will use the configuration variable `merge.tool`.  If the\ndiff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt\nindex 4832bc7..c0f96e7 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -23,7 +23,7 @@ merge.tool::\n \tControls which merge resolution program is used by\n \tlinkgit:git-mergetool[1].  Valid built-in values are: \"kdiff3\",\n \t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\",\n-\t\"diffuse\", \"ecmerge\", \"tortoisemerge\", and\n+\t\"diffuse\", \"ecmerge\", \"tortoisemerge\", \"araxis\", and\n \t\"opendiff\".  Any other value is treated is custom merge tool\n \tand there must be a corresponding mergetool.<tool>.cmd option.\n \ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 1683e6d..ead530d 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -911,7 +911,7 @@ _git_diff ()\n }\n \n __git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n-\t\t\ttkdiff vimdiff gvimdiff xxdiff\n+\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis\n \"\n \n _git_difftool ()\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex 8b5e6a8..e771b63 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -18,6 +18,9 @@ translate_merge_tool_path () {\n \temerge)\n \t\techo emacs\n \t\t;;\n+\taraxis)\n+\t\techo compare\n+\t\t;;\n \t*)\n \t\techo \"$1\"\n \t\t;;\n@@ -43,7 +46,7 @@ check_unchanged () {\n valid_tool () {\n \tcase \"$1\" in\n \tkdiff3 | tkdiff | xxdiff | meld | opendiff | \\\n-\temerge | vimdiff | gvimdiff | ecmerge | diffuse)\n+\temerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)\n \t\t;; # happy\n \ttortoisemerge)\n \t\tif ! merge_mode; then\n@@ -263,6 +266,23 @@ run_merge_tool () {\n \t\t\tstatus=1\n \t\tfi\n \t\t;;\n+\taraxis)\n+\t\tif merge_mode; then\n+\t\t\tif $base_present; then\n+\t\t\t\t\"$merge_tool_path\" -wait -merge -3 -a1 \\\n+\t\t\t\t\t\"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n+\t\t\t\t\t>/dev/null 2>&1\n+\t\t\telse\n+\t\t\t\t\"$merge_tool_path\" -wait -2 \\\n+\t\t\t\t\t\"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n+\t\t\t\t\t>/dev/null 2>&1\n+\t\t\tfi\n+\t\t\tcheck_unchanged\n+\t\telse\n+\t\t\t\"$merge_tool_path\" -wait -2 \"$LOCAL\" \"$REMOTE\" \\\n+\t\t\t\t>/dev/null 2>&1\n+\t\tfi\n+\t\t;;\n \t*)\n \t\tmerge_tool_cmd=\"$(get_merge_tool_cmd \"$1\")\"\n \t\tif test -z \"$merge_tool_cmd\"; then\n@@ -302,7 +322,7 @@ guess_merge_tool () {\n \t\telse\n \t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n-\t\ttools=\"$tools gvimdiff diffuse ecmerge\"\n+\t\ttools=\"$tools gvimdiff diffuse ecmerge araxis\"\n \tfi\n \tif echo \"${VISUAL:-$EDITOR}\" | grep emacs > /dev/null 2>&1; then\n \t\t# $EDITOR is emacs so add emerge as a candidate\n-- \n1.6.3.1.30.g55524\n"},{"id":"114513","messageId":"200905231629.49569.markus.heidelberg@web.de","threadId":"19393","inReplyTo":"1242616700-26022-1-git-send-email-davvid@gmail.com","subject":"Re: [PATCH] mergetool--lib: add support for araxis merge","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-05-23T14:29:49Z","receivedAt":"2009-05-23T14:29:49Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"David Aguilar, 18.05.2009:\n> Araxis merge is now a built-in diff/merge tool.\n> This adds araxis to git-completion and updates\n> the documentation as well.\n> \n> Signed-off-by: David Aguilar <davvid@gmail.com>\n> ---\n> \n> This applies on top of the da/mergetool-lib branch\n> currently in pu.\n> \n> This is a rework of a patch to add araxis support\n> to mergetool which originated on the msysgit list.\n> The commented-out \"-titleN:\" options were\n> intentionally left out of this patch because\n> no amount of shell-quoting could get it to work\n> when the title contained spaces.\n> \n> http://groups.google.com/group/msysgit/browse_thread/thread/fa353fa2240594d7\n> \n>  Documentation/git-difftool.txt         |    2 +-\n>  Documentation/git-mergetool.txt        |    2 +-\n>  Documentation/merge-config.txt         |    2 +-\n>  contrib/completion/git-completion.bash |    2 +-\n>  git-mergetool--lib.sh                  |   24 ++++++++++++++++++++++--\n>  5 files changed, 26 insertions(+), 6 deletions(-)\n> \n> diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\n> @@ -263,6 +266,23 @@ run_merge_tool () {\n>  \t\t\tstatus=1\n>  \t\tfi\n>  \t\t;;\n> +\taraxis)\n> +\t\tif merge_mode; then\n\nHere this is missing:\n\t\t\ttouch \"$BACKUP\"\n\nI had already mentioned it in a reply to your mail from May 03, maybe\nyou have overseen it. But looking in my sent-mail I just noticed that my\nsuggestion had an off-by-one-line error. Now it is correct.\n\n> +\t\t\tif $base_present; then\n> +\t\t\t\t\"$merge_tool_path\" -wait -merge -3 -a1 \\\n> +\t\t\t\t\t\"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n> +\t\t\t\t\t>/dev/null 2>&1\n> +\t\t\telse\n> +\t\t\t\t\"$merge_tool_path\" -wait -2 \\\n> +\t\t\t\t\t\"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n> +\t\t\t\t\t>/dev/null 2>&1\n> +\t\t\tfi\n> +\t\t\tcheck_unchanged\n> +\t\telse\n> +\t\t\t\"$merge_tool_path\" -wait -2 \"$LOCAL\" \"$REMOTE\" \\\n> +\t\t\t\t>/dev/null 2>&1\n> +\t\tfi\n> +\t\t;;\n>  \t*)\n>  \t\tmerge_tool_cmd=\"$(get_merge_tool_cmd \"$1\")\"\n>  \t\tif test -z \"$merge_tool_cmd\"; then\n"}]}