mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
url wasn't ever published as url.url, and is now util.url
This commit is contained in:
parent
b2953e0941
commit
e7abdc3a9a
@ -42,11 +42,18 @@ hg.schemes['git+ssh'] = gitrepo
|
||||
# support for `hg clone localgitrepo`
|
||||
_oldlocal = hg.schemes['file']
|
||||
|
||||
try:
|
||||
urlcls = hgutil.url
|
||||
except AttributeError:
|
||||
class urlcls(object):
|
||||
def __init__(self, path):
|
||||
self.p = hgutil.drop_scheme('file', path)
|
||||
|
||||
def localpath(self):
|
||||
return self.p
|
||||
|
||||
def _local(path):
|
||||
try:
|
||||
p = hgutil.drop_scheme('file', path)
|
||||
except AttributeError:
|
||||
p = url.url(path).localpath()
|
||||
p = urlcls(path).localpath()
|
||||
if (os.path.exists(os.path.join(p, '.git')) and
|
||||
not os.path.exists(os.path.join(p, '.hg'))):
|
||||
return gitrepo
|
||||
|
Loading…
Reference in New Issue
Block a user