[PATCH STABLE] test-check-code-hg: skip test if not in a working dir (issue3248)

Greg Ward greg at gerg.ca
Sat Feb 18 21:31:13 UTC 2012


# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1329600617 18000
# Node ID 79f71ceaedf7446ba78aac835021c091df4e3257
# Parent  41fc1e078d6822502277ac80325ec3db99707a6f
test-check-code-hg: skip test if not in a working dir (issue3248).

diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t
+++ b/tests/test-check-code-hg.t
@@ -1,6 +1,9 @@
   $ check_code="$TESTDIR"/../contrib/check-code.py
   $ cd "$TESTDIR"/..
-
+  $ if ! hg identify -q > /dev/null; then
+  >     echo "skipped: not a Mercurial working dir" >&2
+  >     exit 80
+  > fi
   $ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!'
 
   $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0



More information about the Mercurial-devel mailing list