--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -7,7 +7,7 @@ prune tests/*.err
include *.txt
include templates/map templates/map-*[a-z0-9]
include templates/*.tmpl
-include doc/README doc/*.txt doc/Makefile
+include doc/README doc/Makefile doc/*.txt doc/*.html doc/*.[0-9]
recursive-include contrib *
include README
include CONTRIBUTORS
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+# This Makefile is only used by developers.
+PYTHON=python
+
+all:
+ @echo "Read the file README for install instructions."
+
+clean:
+ -$(PYTHON) setup.py clean --all # ignore errors of this command
+ find . -name '*.py[co]' -exec rm -f '{}' ';'
+ make -C doc clean
+
+dist: tests doc
+ TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest
+
+tests:
+ cd tests && ./run-tests
+
+doc:
+ make -C doc
+
+
+.PHONY: all clean dist tests doc
+
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -2,7 +2,7 @@ SOURCES=$(wildcard *.[0-9].txt)
MAN=$(SOURCES:%.txt=%)
HTML=$(SOURCES:%.txt=%.html)
-all: man
+all: man html
man: $(MAN)
--- a/hgeditor
+++ b/hgeditor
@@ -51,7 +51,11 @@ fi
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