hgeditor with no files changed
Thomas Arendsen Hein
thomas at intevation.de
Mon Aug 22 13:00:15 CDT 2005
Hi!
Just a small hgeditor fix, pullable as usual.
Thomas
# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Node ID 1bc619b12025312a1d2707f7b3d988609d92874d
# Parent 85272e96b96a6689608918deaee27b6bf9de19c1
Don't show the diff in hgeditor if there are no changes in file contents.
diff -r 85272e96b96a6689608918deaee27b6bf9de19c1 -r 1bc619b12025312a1d2707f7b3d988609d92874d hgeditor
--- a/hgeditor Mon Aug 22 06:46:43 2005
+++ b/hgeditor Mon Aug 22 17:56:52 2005
@@ -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
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
More information about the Mercurial
mailing list