mercurial/subrepo.py
branchstable
changeset 21568 8dd17b19e722
parent 21567 5900bc09e684
child 21585 652e07debf10
--- a/mercurial/subrepo.py	Thu May 08 19:03:00 2014 +0900
+++ b/mercurial/subrepo.py	Thu May 08 19:03:00 2014 +0900
@@ -276,8 +276,7 @@
     parent = repo
     while util.safehasattr(parent, '_subparent'):
         parent = parent._subparent
-    p = parent.root.rstrip(os.sep)
-    return repo.root[len(p) + 1:]
+    return repo.root[len(pathutil.normasprefix(parent.root)):]
 
 def subrelpath(sub):
     """return path to this subrepo as seen from outermost repo"""