Changeset: ef6da97822a5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef6da97822a5
Modified Files:
        testing/Mtest.py.in
Branch: Apr2012
Log Message:

Mtest: Use modern os.path.relpath to calculate relative path.


diffs (17 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3418,12 +3418,7 @@ def main(argv) :
             ErrXit("System (-S) must match '"+sv+"' !")
 
     # some relative path's for relocatable HTML output
-    if os.path.normcase(TSTSRCBASE) == os.path.normcase(TSTTRGBASE):
-        RELSRCBASE = os.curdir
-    else:
-        TSTBASE = 
os.path.dirname(os.path.commonprefix([os.path.normcase(TSTSRCBASE), 
os.path.normcase(TSTTRGBASE)]))
-        RELBASE = os.path.join(* [os.pardir] * 
len(TSTTRGBASE[len(TSTBASE+os.sep):].split(os.sep)))
-        RELSRCBASE = RELBASE + TSTSRCBASE[len(TSTBASE):]
+    RELSRCBASE = os.path.relpath(TSTSRCBASE, TSTTRGBASE)
     env['RELSRCBASE'] = RELSRCBASE
 
     #STDERR.flush()
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to