Bug 778259 - Fix fallback relpath implementation for python 2.5- in manifestparser.py. r=jhammel
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 08:54:59 +0200
changeset 101420 47b9642f6f1b45eb3596922ed0ea95904e85f937
parent 101419 ea718abec95cb6ccddd54532ec264ef37eeb4342
child 101421 040c3b5a99d09e1017d221fe3dfb24dfa92f3ec0
push id23232
push useremorley@mozilla.com
push dateSat, 04 Aug 2012 18:12:50 +0000
treeherdermozilla-central@0a17cde2a4b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhammel
bugs778259
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 778259 - Fix fallback relpath implementation for python 2.5- in manifestparser.py. r=jhammel
build/manifestparser.py
testing/mozbase/manifestdestiny/manifestparser/manifestparser.py
--- a/build/manifestparser.py
+++ b/build/manifestparser.py
@@ -45,17 +45,17 @@ except AttributeError:
         start_list = os.path.abspath(start).split(os.path.sep)
         path_list = os.path.abspath(path).split(os.path.sep)
 
         # Work out how much of the filepath is shared by start and path.
         i = len(os.path.commonprefix([start_list, path_list]))
 
         rel_list = [os.path.pardir] * (len(start_list)-i) + path_list[i:]
         if not rel_list:
-            return start
+            return os.curdir
         return os.path.join(*rel_list)
 
 # expr.py
 # from:
 # http://k0s.org/mozilla/hg/expressionparser
 # http://hg.mozilla.org/users/tmielczarek_mozilla.com/expressionparser
 
 # Implements a top-down parser/evaluator for simple boolean expressions.
--- a/testing/mozbase/manifestdestiny/manifestparser/manifestparser.py
+++ b/testing/mozbase/manifestdestiny/manifestparser/manifestparser.py
@@ -45,17 +45,17 @@ except AttributeError:
         start_list = os.path.abspath(start).split(os.path.sep)
         path_list = os.path.abspath(path).split(os.path.sep)
 
         # Work out how much of the filepath is shared by start and path.
         i = len(os.path.commonprefix([start_list, path_list]))
 
         rel_list = [os.path.pardir] * (len(start_list)-i) + path_list[i:]
         if not rel_list:
-            return start
+            return os.curdir
         return os.path.join(*rel_list)
 
 # expr.py
 # from:
 # http://k0s.org/mozilla/hg/expressionparser
 # http://hg.mozilla.org/users/tmielczarek_mozilla.com/expressionparser
 
 # Implements a top-down parser/evaluator for simple boolean expressions.