[PATCH] check-commit: add an automatic testing of all draft changesets under "."

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Aug 6 03:43:24 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1407314451 25200
#      Wed Aug 06 01:40:51 2014 -0700
# Node ID 1932f430cb117d77b6269dea84e2387a17062828
# Parent  1274ff3f20a803fbf665182fa40182cfd2deeb41
check-commit: add an automatic testing of all draft changesets under "."

We introduce a test-check-commit-hg.t file that will happily run the
check-commit file on all draft changeset under the working directory.

This should help newcomers to catch up with the rules. (And will helps old timer
from time to time).

diff --git a/tests/test-check-commit-hg.t b/tests/test-check-commit-hg.t
new file mode 100644
--- /dev/null
+++ b/tests/test-check-commit-hg.t
@@ -0,0 +1,25 @@
+
+
+Enable obsolescence to avoid the warning issue when obsmarker are found
+
+  $ cat > obs.py << EOF
+  > import mercurial.obsolete
+  > mercurial.obsolete._enabled = True
+  > EOF
+  $ echo '[extensions]' >> $HGRCPATH
+  $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
+
+Go back in the hg repo
+
+  $ cd $TESTDIR
+
+Check if it is a repository
+
+  $ test -d ../.hg/ || exit 80
+  $ cd ..
+
+  $ for rev in $(hg log --rev 'draft() and ::.' --template '{rev}\n'); do
+  >    HG_NODE=$rev contrib/check-commit
+  > done
+
+


More information about the Mercurial-devel mailing list