Changeset 653c95574fe6…
Parent 3c744c903a7a…
by
Changes to one file · Browse files at 653c95574fe6 Showing diff from parent 3c744c903a7a Diff from another changeset...
@@ -23,6 +23,13 @@
_schemes = ['local', 'ssh', 'http', 'https']
+try:
+ # hg <= 1.8
+ from mercurial.hg import localpath
+except AttributeError:
+ # hg >= 1.9
+ from mercurial.url import localpath
+
def parseurl(path):
if path.startswith('ssh://'):
scheme = 'ssh'
@@ -351,7 +358,7 @@ known.add(os.path.abspath(self.repo.root).lower())
for path in self.paths.values():
if hg.islocal(path):
- known.add(os.path.abspath(hg.localpath(path)).lower())
+ known.add(os.path.abspath(localpath(path)).lower())
else:
known.add(path)
related = {}
@@ -373,7 +380,7 @@ ui = tempui
for alias, path in ui.configitems('paths'):
if hg.islocal(path):
- abs = os.path.abspath(hg.localpath(path)).lower()
+ abs = os.path.abspath(localpath(path)).lower()
else:
abs = path
if abs not in known:
|
Loading...