diff -r 5900bc09e684 -r 8dd17b19e722 mercurial/subrepo.py --- 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"""