Merge branch 'da/araxis-mergetool'

* da/araxis-mergetool:
  mergetool--lib: add support for araxis merge
This commit is contained in:
Junio C Hamano 2009-06-13 12:47:08 -07:00
commit 1bbc820414
5 changed files with 27 additions and 6 deletions

View File

@ -31,7 +31,7 @@ OPTIONS
Use the diff tool specified by <tool>. Use the diff tool specified by <tool>.
Valid merge tools are: Valid merge tools are:
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
ecmerge, diffuse and opendiff ecmerge, diffuse, opendiff and araxis.
+ +
If a diff tool is not specified, 'git-difftool' If a diff tool is not specified, 'git-difftool'
will use the configuration variable `diff.tool`. If the will use the configuration variable `diff.tool`. If the

View File

@ -27,7 +27,7 @@ OPTIONS
Use the merge resolution program specified by <tool>. Use the merge resolution program specified by <tool>.
Valid merge tools are: Valid merge tools are:
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
diffuse, tortoisemerge and opendiff diffuse, tortoisemerge, opendiff and araxis.
+ +
If a merge resolution program is not specified, 'git-mergetool' If a merge resolution program is not specified, 'git-mergetool'
will use the configuration variable `merge.tool`. If the will use the configuration variable `merge.tool`. If the

View File

@ -23,7 +23,7 @@ merge.tool::
Controls which merge resolution program is used by Controls which merge resolution program is used by
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3", linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", "tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
"diffuse", "ecmerge", "tortoisemerge", and "diffuse", "ecmerge", "tortoisemerge", "araxis", and
"opendiff". Any other value is treated is custom merge tool "opendiff". Any other value is treated is custom merge tool
and there must be a corresponding mergetool.<tool>.cmd option. and there must be a corresponding mergetool.<tool>.cmd option.

View File

@ -927,7 +927,7 @@ _git_diff ()
} }
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
tkdiff vimdiff gvimdiff xxdiff tkdiff vimdiff gvimdiff xxdiff araxis
" "
_git_difftool () _git_difftool ()

View File

@ -18,6 +18,9 @@ translate_merge_tool_path () {
emerge) emerge)
echo emacs echo emacs
;; ;;
araxis)
echo compare
;;
*) *)
echo "$1" echo "$1"
;; ;;
@ -43,7 +46,7 @@ check_unchanged () {
valid_tool () { valid_tool () {
case "$1" in case "$1" in
kdiff3 | tkdiff | xxdiff | meld | opendiff | \ kdiff3 | tkdiff | xxdiff | meld | opendiff | \
emerge | vimdiff | gvimdiff | ecmerge | diffuse) emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)
;; # happy ;; # happy
tortoisemerge) tortoisemerge)
if ! merge_mode; then if ! merge_mode; then
@ -263,6 +266,24 @@ run_merge_tool () {
status=1 status=1
fi fi
;; ;;
araxis)
if merge_mode; then
touch "$BACKUP"
if $base_present; then
"$merge_tool_path" -wait -merge -3 -a1 \
"$BASE" "$LOCAL" "$REMOTE" "$MERGED" \
>/dev/null 2>&1
else
"$merge_tool_path" -wait -2 \
"$LOCAL" "$REMOTE" "$MERGED" \
>/dev/null 2>&1
fi
check_unchanged
else
"$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" \
>/dev/null 2>&1
fi
;;
*) *)
merge_tool_cmd="$(get_merge_tool_cmd "$1")" merge_tool_cmd="$(get_merge_tool_cmd "$1")"
if test -z "$merge_tool_cmd"; then if test -z "$merge_tool_cmd"; then
@ -302,7 +323,7 @@ guess_merge_tool () {
else else
tools="opendiff kdiff3 tkdiff xxdiff meld $tools" tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
fi fi
tools="$tools gvimdiff diffuse ecmerge" tools="$tools gvimdiff diffuse ecmerge araxis"
fi fi
if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then
# $EDITOR is emacs so add emerge as a candidate # $EDITOR is emacs so add emerge as a candidate