Mercurial > hg
changeset 8673:a8066f2fd1aa
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.
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Fri, 29 May 2009 22:18:16 -0400 |
parents | d6b243731763 |
children | 0941ee76489e |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Fri May 29 22:18:15 2009 -0400 +++ b/tests/run-tests.py Fri May 29 22:18:16 2009 -0400 @@ -503,11 +503,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: