let run-tests run optional code coverage tests.
to enable, set env var TEST_COVERAGE to non-empty string. run-tests will
print report after running.
after coverage run, file tests/.coverage will contain coverage data. use
tests/coverage.py to get more info, like annotated source code.
#!/bin/sh
set -e
mkdir test
cd test
echo foo>foo
hg init
hg addremove
hg commit -m "1"
hg verify
hg clone . ../branch
cd ../branch
hg co
echo bar>>foo
hg commit -m "2"
cd ../test
hg pull ../branch
hg verify
hg co
cat foo
hg manifest