hgext3rd/topic/__init__.py
changeset 1903 58cdf061d49a
parent 1901 85390446f8c1
child 1904 f52c02bf47b7
--- a/hgext3rd/topic/__init__.py	Wed Mar 16 12:14:20 2016 -0700
+++ b/hgext3rd/topic/__init__.py	Tue Mar 15 17:26:57 2016 +0000
@@ -94,6 +94,12 @@
     if not isinstance(repo, localrepo.localrepository):
         return # this can be a peer in the ssh case (puzzling)
     class topicrepo(repo.__class__):
+
+        def _restrictcapabilities(self, caps):
+            caps = super(topicrepo, self)._restrictcapabilities(caps)
+            caps.add('topics')
+            return caps
+
         def commit(self, *args, **kwargs):
             backup = self.ui.backupconfig('ui', 'allowemptycommit')
             try:
@@ -324,6 +330,7 @@
 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)
 bundle2.handlecheckheads.params = frozenset() # we need a proper wrape b2 part stuff
 bundle2.parthandlermapping['check:heads'] = bundle2.handlecheckheads