# HG changeset patch # User Kevin Bullock # Date 1518063515 21600 # Node ID c693541ee210bcfcc4eb58328275d8b30d7f374a # Parent 633796ad1684c4b980803eda688dd97a0152acaa compat: drop compat code from hg < 1.9 (!!) diff -r 633796ad1684 -r c693541ee210 hggit/__init__.py --- a/hggit/__init__.py Wed Feb 07 22:08:14 2018 -0600 +++ b/hggit/__init__.py Wed Feb 07 22:18:35 2018 -0600 @@ -106,18 +106,6 @@ # support for `hg clone localgitrepo` _oldlocal = hg.schemes['file'] -# COMPAT: hg 1.9 - url.url class moved into util module -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 _isgitdir(path): """True if the given file path is a git repo.""" if os.path.exists(os.path.join(path, '.hg')): @@ -137,7 +125,7 @@ def _local(path): - p = urlcls(path).localpath() + p = hgutil.url(path).localpath() if _isgitdir(p): return gitrepo # detect git ssh urls (which mercurial thinks is a file-like path)