mercurial/subrepo.py
branchstable
changeset 14766 4f56b7530eab
parent 14664 0ae98cd2a83f
child 14820 7ef125fa9b35
equal deleted inserted replaced
14765:08ef6b5f3715 14766:4f56b7530eab
   196 def _abssource(repo, push=False, abort=True):
   196 def _abssource(repo, push=False, abort=True):
   197     """return pull/push path of repo - either based on parent repo .hgsub info
   197     """return pull/push path of repo - either based on parent repo .hgsub info
   198     or on the top repo config. Abort or return None if no source found."""
   198     or on the top repo config. Abort or return None if no source found."""
   199     if hasattr(repo, '_subparent'):
   199     if hasattr(repo, '_subparent'):
   200         source = util.url(repo._subsource)
   200         source = util.url(repo._subsource)
       
   201         if source.isabs():
       
   202             return str(source)
   201         source.path = posixpath.normpath(source.path)
   203         source.path = posixpath.normpath(source.path)
   202         if posixpath.isabs(source.path) or source.scheme:
       
   203             return str(source)
       
   204         parent = _abssource(repo._subparent, push, abort=False)
   204         parent = _abssource(repo._subparent, push, abort=False)
   205         if parent:
   205         if parent:
   206             parent = util.url(parent)
   206             parent = util.url(parent)
   207             parent.path = posixpath.join(parent.path, source.path)
   207             parent.path = posixpath.join(parent.path, source.path)
   208             parent.path = posixpath.normpath(parent.path)
   208             parent.path = posixpath.normpath(parent.path)