diff hgext3rd/serverminitopic.py @ 5180:515d425c0a05

compat: drop 4.5 related compatibility around wireprotocol module
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Mar 2020 11:07:06 +0100
parents 51d0f2355215
children a4d081923c81
line wrap: on
line diff
--- a/hgext3rd/serverminitopic.py	Tue Mar 10 11:06:37 2020 +0100
+++ b/hgext3rd/serverminitopic.py	Tue Mar 10 11:07:06 2020 +0100
@@ -23,12 +23,7 @@
     util,
 )
 
-# hg <= 4.5 (b4d85bc122bd)
-try:
-    from mercurial import wireproto  # pytype: disable=import-error
-    wireproto.branchmap
-except ImportError:
-    from mercurial import wireprotov1server as wireproto
+from mercurial import wireprotov1server
 
 if util.safehasattr(registrar, 'configitem'):
 
@@ -243,5 +238,5 @@
         # Mercurial 4.9; branchcache.fromfile now takes care of this
         # which is alredy defined on _topiccache
         pass
-    extensions.wrapfunction(wireproto, '_capabilities', wireprotocaps)
+    extensions.wrapfunction(wireprotov1server, '_capabilities', wireprotocaps)
     extensions.wrapfunction(context.changectx, 'branch', topicbranch)