mercurial/subrepoutil.py
changeset 50605 98b805d40c41
parent 50604 b539c60a79ac
child 50606 a30e6401c7f0
equal deleted inserted replaced
50604:b539c60a79ac 50605:98b805d40c41
   398 
   398 
   399 def reporelpath(repo):
   399 def reporelpath(repo):
   400     # type: (localrepo.localrepository) -> bytes
   400     # type: (localrepo.localrepository) -> bytes
   401     """return path to this (sub)repo as seen from outermost repo"""
   401     """return path to this (sub)repo as seen from outermost repo"""
   402     parent = repo
   402     parent = repo
   403     while util.safehasattr(parent, b'_subparent'):
   403     while util.safehasattr(parent, '_subparent'):
   404         parent = parent._subparent
   404         parent = parent._subparent
   405     return repo.root[len(pathutil.normasprefix(parent.root)) :]
   405     return repo.root[len(pathutil.normasprefix(parent.root)) :]
   406 
   406 
   407 
   407 
   408 def subrelpath(sub):
   408 def subrelpath(sub):