hgmerge
changeset 5172 f53d97d651f4
parent 4855 e4480f2b61e9
child 5660 3c80ecdc1bcd
--- a/hgmerge	Wed Aug 15 16:43:40 2007 +0200
+++ b/hgmerge	Wed Aug 15 17:27:51 2007 +0200
@@ -169,7 +169,14 @@
 if [ -n "$MERGE" -o -n "$DIFF3" ]; then
     echo "conflicts detected in $LOCAL"
     cp "$BACKUP" "$CHGTEST"
-    $EDITOR "$LOCAL" || failure
+    case "$EDITOR" in
+        "emacs")
+            $EDITOR "$LOCAL" --eval '(condition-case nil (smerge-mode 1) (error nil))' || failure
+            ;;
+        *)
+            $EDITOR "$LOCAL" || failure
+            ;;
+    esac
     # Some editors do not return meaningful error codes
     # Do not take any chances
     $TEST "$LOCAL" -nt "$CHGTEST" && conflicts_or_success || ask_if_merged