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) |