[PATCH 2 of 2] tests: add test for chg compatibility

Jun Wu quark at fb.com
Fri Apr 1 15:07:45 EDT 2016


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1459537185 -3600
#      Fri Apr 01 19:59:45 2016 +0100
# Node ID 93af673b74fd136c872b41893457f78aa4664879
# Parent  8390cc06d07df6012da97e8c509c6fbbc1df0dc1
tests: add test for chg compatibility

We want to make sure extension developers are aware of chg compatibility
issues. With `contrib/check-chg-compat.py`, it's easy to enforce the check for
the `hgext` directory and let's do it now.

Note the convert extension depends on external Python modules so the output may
vary.

Extensions outside the core mercurial may want to add similar tests using the
check script as well.

diff --git a/tests/test-check-chg-compat.t b/tests/test-check-chg-compat.t
new file mode 100644
--- /dev/null
+++ b/tests/test-check-chg-compat.t
@@ -0,0 +1,10 @@
+#require test-repo
+
+  $ cd "$TESTDIR"/..
+
+  $ hg files 'glob:hgext/{*,**/__init__}.py' | xargs python contrib/check-chg-compat.py 2>/dev/null
+  convert: environ accessed at load time: * (glob) (?)
+  factotum: config accessed at load time: factotum.executable, factotum.mountpoint, factotum.service
+  histedit: config accessed at load time: experimental.histeditng
+  pager: config accessed at load time: ui.formatted, ui.nontty
+  win32text: config accessed at load time: win32text.warn


More information about the Mercurial-devel mailing list