105 def _abssource(repo, push=False): |
105 def _abssource(repo, push=False): |
106 if hasattr(repo, '_subparent'): |
106 if hasattr(repo, '_subparent'): |
107 source = repo._subsource |
107 source = repo._subsource |
108 if source.startswith('/') or '://' in source: |
108 if source.startswith('/') or '://' in source: |
109 return source |
109 return source |
110 return os.path.join(_abssource(repo._subparent), repo._subsource) |
110 parent = _abssource(repo._subparent) |
|
111 if '://' in parent: |
|
112 if parent[-1] == '/': |
|
113 parent = parent[:-1] |
|
114 return parent + '/' + source |
|
115 return os.path.join(parent, repo._subsource) |
111 if push and repo.ui.config('paths', 'default-push'): |
116 if push and repo.ui.config('paths', 'default-push'): |
112 return repo.ui.config('paths', 'default-push', repo.root) |
117 return repo.ui.config('paths', 'default-push', repo.root) |
113 return repo.ui.config('paths', 'default', repo.root) |
118 return repo.ui.config('paths', 'default', repo.root) |
114 |
119 |
115 def subrepo(ctx, path): |
120 def subrepo(ctx, path): |