History

compat: drop compat code from hg < 1.9 (!!)

Kevin Bullock committed 8 years ago

Commit 3dfd3fe1 parent b4d12771 file · +1 −13Browse files

Unified · Split

hggit/__init__.py+1−13
@@ -106,18 +106,6 @@ for _scheme in util.gitschemes: · 105 unmodified lines
106106 # support for `hg clone localgitrepo`
107107 _oldlocal = hg.schemes['file']
108108
109−# COMPAT: hg 1.9 - url.url class moved into util module
110−try:
111− urlcls = hgutil.url
112−except AttributeError:
113− class urlcls(object):
114− def __init__(self, path):
115− self.p = hgutil.drop_scheme('file', path)
116−
117− def localpath(self):
118− return self.p
119−
120−
121109 def _isgitdir(path):
122110 """True if the given file path is a git repo."""
123111 if os.path.exists(os.path.join(path, '.hg')):
@@ -137,7 +125,7 @@ def _isgitdir(path): · 13 unmodified lines
137125
138126
139127 def _local(path):
140− p = urlcls(path).localpath()
128+ p = hgutil.url(path).localpath()
141129 if _isgitdir(p):
142130 return gitrepo
143131 # detect git ssh urls (which mercurial thinks is a file-like path)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t