changeset 1834:f23a97d14895

compat: drop compat for older wireproto implementation We only support Mercurial version with these attributes.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 28 Feb 2017 14:29:36 +0100
parents 545761a5a5b3
children 93d4661a6ee7
files hgext3rd/evolve/__init__.py
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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):