changeset 1599:f93fde8f5027

remove the gpg stuff from hgeditor (superseded by the signing extension) remove the gpg stuff from hgeditor, update the comments to make it clear it can be used to show a diff while commiting
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 27 Dec 2005 13:12:53 -0600
parents 14d1f1868bf6
children 728fd9584993
files hgeditor
diffstat 1 files changed, 4 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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 $?