comparison hgeditor @ 1009:1bc619b12025

Don't show the diff in hgeditor if there are no changes in file contents.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 22 Aug 2005 19:56:52 +0200
parents 9c918287d10b
children f93fde8f5027
comparison
equal deleted inserted replaced
1008:85272e96b96a 1009:1bc619b12025
49 echo -e "\nmanifest hash: $MANIFEST" >> "$HGTMP/msg" 49 echo -e "\nmanifest hash: $MANIFEST" >> "$HGTMP/msg"
50 fi 50 fi
51 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$HGTMP/msg" 51 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$HGTMP/msg"
52 52
53 CHECKSUM=`md5sum "$HGTMP/msg"` 53 CHECKSUM=`md5sum "$HGTMP/msg"`
54 $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $? 54 if [ -s "$HGTMP/diff" ]; then
55 $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $?
56 else
57 $EDITOR "$HGTMP/msg" || exit $?
58 fi
55 echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && exit 13 59 echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && exit 13
56 60
57 if [ "$SIGN" == "1" ]; then 61 if [ "$SIGN" == "1" ]; then
58 { 62 {
59 head -n 1 "$HGTMP/msg" 63 head -n 1 "$HGTMP/msg"