compat: drop compat for older wireproto implementation
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 28 Feb 2017 14:29:36 +0100
changeset 1834 f23a97d14895
parent 1833 545761a5a5b3
child 1835 93d4661a6ee7
compat: drop compat for older wireproto implementation We only support Mercurial version with these attributes.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Tue Feb 28 14:28:54 2017 +0100
+++ b/hgext3rd/evolve/__init__.py	Tue Feb 28 14:29:36 2017 +0100
@@ -87,15 +87,9 @@
 from mercurial import util
 from mercurial import repair
 
-try:
-    from mercurial import obsolete
-    if not obsolete._enabled:
-        obsolete._enabled = True
-    from mercurial import wireproto
-    gboptslist = getattr(wireproto, 'gboptslist', None)
-    gboptsmap = getattr(wireproto, 'gboptsmap', None)
-except (ImportError, AttributeError):
-    gboptslist = gboptsmap = None
+from mercurial import obsolete
+if not obsolete._enabled:
+    obsolete._enabled = True
 
 # Flags for enabling optional parts of evolve
 commandopt = 'allnewcommands'
@@ -3684,7 +3678,7 @@
 
 @eh.uisetup
 def addgetbundleargs(self):
-    gboptsmap['evo_obscommon'] = 'nodes'
+    wireproto.gboptsmap['evo_obscommon'] = 'nodes'
 
 @eh.wrapfunction(exchange, '_pullbundle2extraprepare')
 def _addobscommontob2pull(orig, pullop, kwargs):