# HG changeset patch # User mpm@selenic.com # Date 1124832079 25200 # Node ID f46e809bbe873a3d9230c84273a6958f78615f2e # Parent 42956a6cb25755c7044259d35b02bd787664a4c3# Parent 1bc619b12025312a1d2707f7b3d988609d92874d Merge with TAH diff --git a/MANIFEST.in b/MANIFEST.in --- 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 diff --git a/Makefile b/Makefile 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 + diff --git a/doc/Makefile b/doc/Makefile --- 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) diff --git a/hgeditor b/hgeditor --- 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