diff easyhg-merge.sh @ 328:ea62eb083ed4 filelist_right_button_menu

Merge fixes: primarily, handle failed merges better
author Chris Cannam
date Fri, 11 Mar 2011 18:08:22 +0000
parents a1c8630a0057
children d2e4bf428cfc
line wrap: on
line diff
--- a/easyhg-merge.sh	Fri Mar 11 17:42:12 2011 +0000
+++ b/easyhg-merge.sh	Fri Mar 11 18:08:22 2011 +0000
@@ -12,23 +12,15 @@
 left="$1"
 ancestor="$2"
 right="$3"
-found=""
 for d in kdiff3 kdiff3.exe; do
     if [ -x "$p/$d" ]; then
-	found=true
-	"$p/$d" "$ancestor" "$left" "$right" -o "$out"
-	break
+	exec "$p/$d" "$ancestor" "$left" "$right" -o "$out"
     elif [ -x "$(type -path $d)" ]; then
-	found=true
-	"$d" "$ancestor" "$left" "$right" -o "$out"
-	break;
+	exec "$d" "$ancestor" "$left" "$right" -o "$out"
     fi
 done
-if [ -z "$found" ]; then
-    fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
-    if [ -x "$fm" ]; then
-	found=true
-	"$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right"
-    fi
+fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
+if [ -x "$fm" ]; then
+    exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right"
 fi
-[ -n "$found" ]
+exit 1