Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 9186:f783bb979fb3
subrepo: use '/' for joining non-local paths
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 22 Jul 2009 17:53:23 -0500 |
parents | 70f5d3be5917 |
children | 3f650f6aa130 5987183d6e59 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed Jul 22 00:28:37 2009 -0500 +++ b/mercurial/subrepo.py Wed Jul 22 17:53:23 2009 -0500 @@ -107,7 +107,12 @@ source = repo._subsource if source.startswith('/') or '://' in source: return source - return os.path.join(_abssource(repo._subparent), repo._subsource) + parent = _abssource(repo._subparent) + if '://' in parent: + if parent[-1] == '/': + parent = parent[:-1] + return parent + '/' + source + return os.path.join(parent, repo._subsource) if push and repo.ui.config('paths', 'default-push'): return repo.ui.config('paths', 'default-push', repo.root) return repo.ui.config('paths', 'default', repo.root)