[PATCH 3 of 4] run-tests: fix _checkhglib() so it's correct when using --with-hg
Greg Ward
greg-hg at gerg.ca
Tue May 19 09:19:30 CDT 2009
# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1242741458 14400
# Node ID 6af3ee65e7884ec108053900076a1a7b1362d30d
# Parent 15f2f75a69ce89fd1d636f5bf81c4687978ff2ba
run-tests: fix _checkhglib() so it's correct when using --with-hg.
Since this makes the warning less likely, upgrade it to a "real"
warning to stderr.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -495,11 +495,13 @@
def _checkhglib(verb):
"""Ensure that the 'mercurial' package imported by python is
- the one we expect it to be. If not, print a message to stdout."""
- expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial')
+ the one we expect it to be. If not, print a warning to stderr."""
+ expecthg = os.path.join(PYTHONDIR, 'mercurial')
actualhg = _gethgpath()
if actualhg != expecthg:
- print '# %s unexpected mercurial: %s' % (verb, actualhg)
+ sys.stderr.write('warning: %s with unexpected mercurial lib: %s\n'
+ ' (expected %s)\n'
+ % (verb, actualhg, expecthg))
def runchildren(options, tests):
if not options.with_hg:
More information about the Mercurial-devel
mailing list