Changeset: 18e4be07262d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=18e4be07262d
Modified Files:
testing/Mtest.py.in
Branch: Aug2011
Log Message:
Mtest: fix HG links to *.src files.
diffs (72 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -725,9 +725,21 @@ def CreateTstWhatXhtml (env, TST, stable
'target': target},
Text(stableWHAT[1:])))
if REV:
+ d = urlpref
+ if os.path.isfile(TST + stableWHAT + '.src'):
+ # there's only one file like this...
+ fl = open(TST + EXT + '.src').readline().strip()
+ if fl.startswith('$RELSRCDIR/'):
+ fl = fl[11:]
+ while fl.startswith('../'):
+ fl = fl[3:]
+ d = d[:d.rindex('/')]
+ fl = '%s/%s' % (d, fl)
+ else:
+ fl = '%s/%s%s' % (d, TST, stableWHAT)
text.addchildren([
Text(' (id '),
- Element('a', {'href': '%s/%s%s' % (urlpref, TST, stableWHAT),
+ Element('a', {'href': fl,
'target': target}, Text(REV)),
Text(')')])
text.addchildren([
@@ -739,9 +751,22 @@ def CreateTstWhatXhtml (env, TST, stable
Element('a', {'href': TST + EXT, 'target': target},
Text('%s%s' % (TST, EXT)))])
if REV:
+ d = urlpref
+ if os.path.isfile(TST + EXT + '.src'):
+ fl = open(TST + EXT + '.src').readline().strip()
+ if fl.startswith('$RELSRCDIR/'):
+ fl = fl[11:]
+ while fl.startswith('../'):
+ fl = fl[3:]
+ d = d[:d.rindex('/')]
+ fl = '%s/%s' % (d, fl)
+ elif os.path.isfile(TST + EXT + '.in'):
+ fl = '%s/%s%s.in' % (d, TST, EXT)
+ else:
+ fl = '%s/%s%s' % (d, TST, EXT)
text.addchildren([
Text(' (id '),
- Element('a', {'href': '%s/%s%s' % (urlpref, TST, EXT),
+ Element('a', {'href': fl,
'target': target}, Text(REV)),
Text(')')])
text.addchildren([
@@ -1839,7 +1864,20 @@ def RunTest(env, TST, BusyPorts, COND, o
pass
if REV:
- hglink = ' (id <a href="%s%s/%s/%s%s">%s</a>)' % (URLPREFIX,
url(TSTDIR), TSTSUFF, TST, EXT, REV)
+ d = '%s/%s' % (url(TSTDIR), TSTSUFF)
+ if os.path.isfile(TST + EXT + '.src'):
+ f = open(TST + EXT + '.src').readline().strip()
+ if f.startswith('$RELSRCDIR/'):
+ f = f[11:]
+ while f.startswith('../'):
+ f = f[3:]
+ d = d[:d.rindex('/')]
+ f = '%s/%s' % (d, f)
+ elif os.path.isfile(TST + EXT + '.in'):
+ f = '%s/%s%s.in' % (d, TST, EXT)
+ else:
+ f = '%s/%s%s' % (d, TST, EXT)
+ hglink = ' (id <a href="%s%s">%s</a>)' % (URLPREFIX, f, REV)
else:
hglink = ''
diff_html = open('%s.out.diff.html' % TST,"w")
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list