--- a/hgext3rd/evolve/obsdiscovery.py Tue Apr 24 12:07:35 2018 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py Tue Apr 24 16:13:42 2018 +0100
@@ -51,14 +51,14 @@
stablerangecache,
)
-try: # < hg-4.6
+try:
+ from mercurial import wireprototypes, wireprotov1server
+ from mercurial.wireprotov1peer import wirepeer
+ from mercurial.wireprototypes import encodelist, decodelist
+except (ImportError, AttributeError): # <= hg-4.5
from mercurial import wireproto as wireprototypes
wireprotov1server = wireprototypes
from mercurial.wireproto import wirepeer, encodelist, decodelist
-except (ImportError, AttributeError):
- from mercurial import wireprototypes, wireprotov1server
- from mercurial.wireprotov1peer import wirepeer
- from mercurial.wireprototypes import encodelist, decodelist
_pack = struct.pack
_unpack = struct.unpack
--- a/hgext3rd/evolve/obsexchange.py Tue Apr 24 12:07:35 2018 +0100
+++ b/hgext3rd/evolve/obsexchange.py Tue Apr 24 16:13:42 2018 +0100
@@ -54,12 +54,12 @@
@eh.uisetup
def addgetbundleargs(self):
try:
- from mercurial import wireprototypes
- gboptsmap = wireprototypes.GETBUNDLE_ARGUMENTS
- except (ImportError, AttributeError):
# <= hg 4.5
from mercurial import wireproto
gboptsmap = wireproto.gboptsmap
+ except (ImportError, AttributeError):
+ from mercurial import wireprototypes
+ gboptsmap = wireprototypes.GETBUNDLE_ARGUMENTS
gboptsmap['evo_obscommon'] = 'nodes'
gboptsmap['evo_missing_nodes'] = 'nodes'