mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
compatibility with new url handling in Mercurial 1.9
This commit is contained in:
parent
e0d8a4f3f9
commit
be6c59edbe
@ -24,6 +24,7 @@ from mercurial import extensions
|
||||
from mercurial import hg
|
||||
from mercurial import localrepo
|
||||
from mercurial import util as hgutil
|
||||
from mercurial import url
|
||||
from mercurial.i18n import _
|
||||
|
||||
demandimport.ignore.extend([
|
||||
@ -42,7 +43,10 @@ hg.schemes['git+ssh'] = gitrepo
|
||||
_oldlocal = hg.schemes['file']
|
||||
|
||||
def _local(path):
|
||||
p = hgutil.drop_scheme('file', path)
|
||||
try:
|
||||
p = hgutil.drop_scheme('file', path)
|
||||
except AttributeError:
|
||||
p = url.url(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