Mercurial > hg
diff hgmerge @ 5172:f53d97d651f4
Use smerge minor mode in emacs to resolve conflicts.
The condition-case is used to suppress errors with emacs versions before 21.
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Wed, 15 Aug 2007 17:27:51 +0200 |
parents | e4480f2b61e9 |
children | 3c80ecdc1bcd |
line wrap: on
line diff
--- 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