comparison mercurial/subrepo.py @ 9219:3f650f6aa130

merge with crew-stable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 23 Jul 2009 20:44:26 +0200
parents 9aebeea7ac00 f783bb979fb3
children e2fd9b62349b
comparison
equal deleted inserted replaced
9218:d3db87d68337 9219:3f650f6aa130
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):