Mercurial > hg > easyhg
changeset 274:24820581e532
* Use kdiff3 from path if present; return sensible return code
author | Chris Cannam |
---|---|
date | Thu, 10 Feb 2011 18:49:01 +0000 |
parents | cc95394e2392 |
children | cbfc1930289a |
files | easyhg-extdiff.sh easyhg-merge.sh |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg-extdiff.sh Tue Jan 25 16:41:40 2011 +0000 +++ b/easyhg-extdiff.sh Thu Feb 10 18:49:01 2011 +0000 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x p=`dirname $0` if [ $# -lt 2 ]; then echo Insufficient arguments: $@ @@ -13,11 +13,18 @@ found=true "$p/$d" "$1" "$2" break + elif [ -x "$(type -path $d)" ]; then + found=true + "$d" "$1" "$2" + break; fi done if [ -z "$found" ]; then od=/usr/bin/opendiff if [ -x "$od" ]; then + found=true "$od" "$1" "$2" | cat fi fi +[ -z "$found" ] +
--- a/easyhg-merge.sh Tue Jan 25 16:41:40 2011 +0000 +++ b/easyhg-merge.sh Thu Feb 10 18:49:01 2011 +0000 @@ -18,6 +18,10 @@ found=true "$p/$d" "$ancestor" "$left" "$right" -o "$out" break + elif [ -x "$(type -path $d)" ]; then + found=true + "$d" "$ancestor" "$left" "$right" -o "$out" + break; fi done if [ -z "$found" ]; then @@ -26,3 +30,4 @@ "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" fi fi +[ -z "$found" ]