mercurial/subrepo.py
branchstable
changeset 15191 fccd350acf79
parent 15055 d629f1e89021
child 15208 d0694223861a
--- a/mercurial/subrepo.py	Sat Oct 01 15:49:29 2011 -0500
+++ b/mercurial/subrepo.py	Sun Oct 02 16:41:07 2011 -0500
@@ -183,7 +183,8 @@
     parent = repo
     while hasattr(parent, '_subparent'):
         parent = parent._subparent
-    return repo.root[len(parent.root)+1:]
+    p = parent.root.rstrip(os.sep)
+    return repo.root[len(p) + 1:]
 
 def subrelpath(sub):
     """return path to this subrepo as seen from outermost repo"""