hgext3rd/topic/__init__.py
changeset 1944 daad8249d5cf
parent 1943 cd56f4d8b5a3
child 1945 f4f5bf8b4d17
--- a/hgext3rd/topic/__init__.py	Wed Mar 30 03:22:50 2016 -0700
+++ b/hgext3rd/topic/__init__.py	Wed Mar 30 21:53:55 2016 -0700
@@ -18,14 +18,11 @@
 from mercurial.i18n import _
 from mercurial import (
     branchmap,
-    bundle2,
     changegroup,
     cmdutil,
     commands,
     context,
-    discovery as discoverymod,
     error,
-    exchange,
     extensions,
     localrepo,
     lock,
@@ -36,7 +33,6 @@
     patch,
     phases,
     util,
-    wireproto,
 )
 
 from . import (
@@ -93,6 +89,7 @@
 def uisetup(ui):
     destination.modsetup(ui)
     topicrevset.modsetup(ui)
+    discovery.modsetup(ui)
 
 @contextlib.contextmanager
 def usetopicmap(repo):
@@ -356,16 +353,7 @@
 
 extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap)
 extensions.wrapfunction(merge, 'update', mergeupdatewrap)
-extensions.wrapfunction(discoverymod, '_headssummary', discovery._headssummary)
-extensions.wrapfunction(wireproto, 'branchmap', discovery.wireprotobranchmap)
-extensions.wrapfunction(wireproto, '_capabilities', discovery.wireprotocaps)
-extensions.wrapfunction(bundle2, 'handlecheckheads', discovery.handlecheckheads)
-# we need a proper wrape b2 part stuff
-bundle2.handlecheckheads.params = frozenset()
-bundle2.parthandlermapping['check:heads'] = bundle2.handlecheckheads
-extensions.wrapfunction(exchange, '_pushb2phases', discovery._pushb2phases)
 extensions.wrapfunction(changegroup.cg1unpacker, 'apply', cgapply)
-exchange.b2partsgenmapping['phase'] = exchange._pushb2phases
 cmdutil.summaryhooks.add('topic', summaryhook)
 
 if util.safehasattr(cmdutil, 'extraexport'):