# HG changeset patch # User Matt Mackall # Date 1317591667 18000 # Node ID fccd350acf799f756e3e09166d02b22f1360336c # Parent a9b0f5624ffc32281371b16d99d31cccf4581671 subrepo: fix repo relative path calculation for root directories (issue3033) diff -r a9b0f5624ffc -r fccd350acf79 mercurial/subrepo.py --- 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"""