changeset 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 85272e96b96a
children f46e809bbe87
files hgeditor
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgeditor	Mon Aug 22 08:46:43 2005 +0200
+++ b/hgeditor	Mon Aug 22 19:56:52 2005 +0200
@@ -51,7 +51,11 @@
 grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$HGTMP/msg"
 
 CHECKSUM=`md5sum "$HGTMP/msg"`
-$EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $?
+if [ -s "$HGTMP/diff" ]; then
+    $EDITOR "$HGTMP/msg" "$HGTMP/diff" || exit $?
+else
+    $EDITOR "$HGTMP/msg" || exit $?
+fi
 echo "$CHECKSUM" | md5sum -c >/dev/null 2>&1 && exit 13
 
 if [ "$SIGN" == "1" ]; then