# HG changeset patch # User Benoit Boissinot # Date 1135710773 21600 # Node ID f93fde8f50276ef56f11fb83e90cd622f28e2a39 # Parent 14d1f1868bf636296e3323aef660355c2800af73 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 diff -r 14d1f1868bf6 -r f93fde8f5027 hgeditor --- 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 $?