Mercurial > hg > easyhg
changeset 379:d2e4bf428cfc
Try to make kdiff3 a bit clearer
author | Chris Cannam |
---|---|
date | Wed, 13 Apr 2011 17:09:57 +0100 |
parents | ad2e56d1e4c4 |
children | 3a6f15c7e520 |
files | easyhg-merge.bat easyhg-merge.sh |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg-merge.bat Tue Apr 12 12:21:51 2011 +0100 +++ b/easyhg-merge.bat Wed Apr 13 17:09:57 2011 +0100 @@ -18,5 +18,5 @@ if "%found%"=="" ( echo. "Failed to find kdiff.exe in path" ) else ( - "%found%" "%~2" "%~1" "%~3" -o "%~1" + "%found%" "%~2" "%~1" "%~3" -o "%~1" --auto -L1 "%~1 (Common ancestor)" -L2 "%~1 (Your current version)" -L3 "%~1 (Version being merged)" )
--- a/easyhg-merge.sh Tue Apr 12 12:21:51 2011 +0100 +++ b/easyhg-merge.sh Wed Apr 13 17:09:57 2011 +0100 @@ -13,10 +13,15 @@ ancestor="$2" right="$3" for d in kdiff3 kdiff3.exe; do - if [ -x "$p/$d" ]; then - exec "$p/$d" "$ancestor" "$left" "$right" -o "$out" - elif [ -x "$(type -path $d)" ]; then - exec "$d" "$ancestor" "$left" "$right" -o "$out" + exe="$p/$d" + if [ ! -x "$exe" ]; then + exe="$(type -path $d)" + if [ ! -x "$exe" ]; then + exe="" + fi + fi + if [ -n "$exe" ]; then + exec "$exe" "$ancestor" "$left" "$right" --output "$out" --auto -L1 "`basename $left` (Common ancestor)" -L2 "$left (Your current version)" -L3 "`basename $left` (Version being merged)" fi done fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge