Mercurial > hgsubversion
diff hgsubversion/__init__.py @ 1595:74c5fd9c3e76
hgsubversion: drop some compat code for hg < 3.3
hg 3.3 is very old and also not supported by current hgsubversion. So let's drop
some compat code.
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 13 Nov 2018 19:15:59 +0300 |
parents | 39e2f8f8f205 |
children | 394007c5efea |
line wrap: on
line diff
--- a/hgsubversion/__init__.py +++ b/hgsubversion/__init__.py @@ -21,12 +21,7 @@ import inspect import os from mercurial import commands -try: - from mercurial import exchange - exchange.push # existed in first iteration of this file -except ImportError: - # We only *use* the exchange module in hg 3.2+, so this is safe - pass +from mercurial import exchange from mercurial import error as hgerror from mercurial import extensions from mercurial import help @@ -157,12 +152,8 @@ def extsetup(ui): except: pass - if not hgutil.safehasattr(localrepo.localrepository, 'push'): - # Mercurial >= 3.2 - extensions.wrapfunction(exchange, 'push', wrappers.exchangepush) - if not hgutil.safehasattr(localrepo.localrepository, 'pull'): - # Mercurial >= 3.2 - extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull) + extensions.wrapfunction(exchange, 'push', wrappers.exchangepush) + extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull) helpdir = os.path.join(os.path.dirname(__file__), 'help')