run-tests: move _hgpath() up so it's not in the middle of the main program.
--- a/tests/run-tests.py Mon Apr 20 21:04:24 2009 -0400
+++ b/tests/run-tests.py Mon Apr 20 21:07:05 2009 -0400
@@ -274,6 +274,13 @@
python = '"%s" "%s" -x' % (sys.executable,
os.path.join(TESTDIR,'coverage.py'))
+def _hgpath():
+ cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
+ hgpath = os.popen(cmd % python)
+ path = hgpath.read().strip()
+ hgpath.close()
+ return path
+
def output_coverage():
vlog("# Producing coverage report")
omit = [BINDIR, TESTDIR, PYTHONDIR]
@@ -525,13 +532,6 @@
PYTHONDIR = os.path.join(INST, "lib", "python")
COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
-def _hgpath():
- cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
- hgpath = os.popen(cmd % python)
- path = hgpath.read().strip()
- hgpath.close()
- return path
-
expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial')
hgpkg = None