Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 15055:d629f1e89021 stable 1.9.2
subrepo: fix cloning of repos from urls without slash after host (issue2970)
This fixes a regression introduced with the new url handling in 1.9.
This should perhaps be fixed in the url class instead, but that might be too
invasive for a stable bugfix.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 26 Aug 2011 16:23:35 +0200 |
parents | a115b5ee9c63 |
children | 86380f24e697 fccd350acf79 |
comparison
equal
deleted
inserted
replaced
15053:17ffb30d9174 | 15055:d629f1e89021 |
---|---|
202 return str(source) | 202 return str(source) |
203 source.path = posixpath.normpath(source.path) | 203 source.path = posixpath.normpath(source.path) |
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 or '', source.path) |
208 parent.path = posixpath.normpath(parent.path) | 208 parent.path = posixpath.normpath(parent.path) |
209 return str(parent) | 209 return str(parent) |
210 else: # recursion reached top repo | 210 else: # recursion reached top repo |
211 if hasattr(repo, '_subtoppath'): | 211 if hasattr(repo, '_subtoppath'): |
212 return repo._subtoppath | 212 return repo._subtoppath |