[PATCH 2 of 5] run-tests: move _hgpath() up so it's not in the middle of the main program
Greg Ward
greg-hg at gerg.ca
Mon Apr 20 20:53:08 CDT 2009
# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1240276025 14400
# Node ID 2b49b25aabf6059d228d9447ba16cf2da8a0b8dc
# Parent 14bf081c5459d61f9bd7cf5aebdfa17b225451af
run-tests: move _hgpath() up so it's not in the middle of the main program.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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
More information about the Mercurial-devel
mailing list