hgeditor
changeset 1599 f93fde8f5027
parent 1009 1bc619b12025
child 1706 20b621154e17
--- a/hgeditor	Tue Dec 27 13:09:49 2005 -0600
+++ b/hgeditor	Tue Dec 27 13:12:53 2005 -0600
@@ -1,10 +1,7 @@
 #!/bin/sh
 #
-# This is an example of using HGEDITOR to automate the signing of
-# commits and so on.
-
-# change this to one to turn on GPG support
-SIGN=0
+# This is an example of using HGEDITOR to create of diff to review the
+# changes while commiting.
 
 # If you want to pass your favourite editor some other parameters
 # only for Mercurial, modify this:
@@ -43,12 +40,7 @@
     done
 )
 
-echo > "$HGTMP/msg"
-if [ "$SIGN" == "1" ]; then
-    MANIFEST=`grep '^HG: manifest hash' "$1" | cut -b 19-`
-    echo -e "\nmanifest hash: $MANIFEST" >> "$HGTMP/msg"
-fi
-grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$HGTMP/msg"
+cat "$1" > "$HGTMP/msg"
 
 CHECKSUM=`md5sum "$HGTMP/msg"`
 if [ -s "$HGTMP/diff" ]; then
@@ -58,14 +50,6 @@
 fi
 echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && exit 13
 
-if [ "$SIGN" == "1" ]; then
-    {
-        head -n 1 "$HGTMP/msg"
-        echo
-        grep -v "^HG:" "$HGTMP/msg" | gpg -t -a -u "${HGUSER}" --clearsign
-    } > "$HGTMP/msg.gpg" && mv "$HGTMP/msg.gpg" "$1"
-else
-    mv "$HGTMP/msg" "$1"
-fi
+mv "$HGTMP/msg" "$1"
 
 exit $?