changeset 420be7bbd656 in /var/www/hg/repositories/MonetDB
details: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=420be7bbd656
description: making Mtest.py work without -p in subdirectory, again:
Also in a Mercurial (hg) checkout,
Mtest.py now manages (tries) to guess the package to be tested
even when called in a subdirectory of that package,
and hence works in that case, again, also without "-p <package>"
option.
In general, Mtest.py now uses the following resources to guess the
package name:
- CVS/Repository
- .svn/entries
- first path component of `pwd` without `hg root` prefix
- directory name of `pwd` (works only if called in top-level directory)
diffstat:
testing/src/Mtest.py.in | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r c7152a6acf84 -r 420be7bbd656 testing/src/Mtest.py.in
--- a/testing/src/Mtest.py.in Tue May 04 17:38:12 2010 +0200
+++ b/testing/src/Mtest.py.in Wed May 05 00:34:37 2010 +0200
@@ -2940,6 +2940,17 @@
if fnd:
repo = fnd.group(1).strip()
else:
+ try:
+ proc = subprocess.Popen(['hg','root'], stdin = subprocess.PIPE, stdout
= subprocess.PIPE, universal_newlines = True)
+ out,err = proc.communicate()
+ if out:
+ hgr =
os.path.normcase(os.path.normpath(os.path.realpath(out.strip())))
+ cwd =
os.path.normcase(os.path.normpath(os.path.realpath(os.getcwd())))
+ if hgr == cwd[:len(hgr)]:
+ repo = cwd[len(hgr+os.sep):].split(os.sep)[0]
+ except:
+ pass
+if not repo:
repo = os.getcwd().split(os.sep)[-1]
if repo:
repo = repo.lower()
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list