91 return [] |
87 return [] |
92 |
88 |
93 def uisetup(ui): |
89 def uisetup(ui): |
94 destination.modsetup(ui) |
90 destination.modsetup(ui) |
95 topicrevset.modsetup(ui) |
91 topicrevset.modsetup(ui) |
|
92 discovery.modsetup(ui) |
96 |
93 |
97 @contextlib.contextmanager |
94 @contextlib.contextmanager |
98 def usetopicmap(repo): |
95 def usetopicmap(repo): |
99 """use awful monkey patching to update the topic cache""" |
96 """use awful monkey patching to update the topic cache""" |
100 oldbranchcache = branchmap.branchcache |
97 oldbranchcache = branchmap.branchcache |
354 entry[1].append(('t', 'topic', '', |
351 entry[1].append(('t', 'topic', '', |
355 _("use specified topic"), _('TOPIC'))) |
352 _("use specified topic"), _('TOPIC'))) |
356 |
353 |
357 extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap) |
354 extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap) |
358 extensions.wrapfunction(merge, 'update', mergeupdatewrap) |
355 extensions.wrapfunction(merge, 'update', mergeupdatewrap) |
359 extensions.wrapfunction(discoverymod, '_headssummary', discovery._headssummary) |
|
360 extensions.wrapfunction(wireproto, 'branchmap', discovery.wireprotobranchmap) |
|
361 extensions.wrapfunction(wireproto, '_capabilities', discovery.wireprotocaps) |
|
362 extensions.wrapfunction(bundle2, 'handlecheckheads', discovery.handlecheckheads) |
|
363 # we need a proper wrape b2 part stuff |
|
364 bundle2.handlecheckheads.params = frozenset() |
|
365 bundle2.parthandlermapping['check:heads'] = bundle2.handlecheckheads |
|
366 extensions.wrapfunction(exchange, '_pushb2phases', discovery._pushb2phases) |
|
367 extensions.wrapfunction(changegroup.cg1unpacker, 'apply', cgapply) |
356 extensions.wrapfunction(changegroup.cg1unpacker, 'apply', cgapply) |
368 exchange.b2partsgenmapping['phase'] = exchange._pushb2phases |
|
369 cmdutil.summaryhooks.add('topic', summaryhook) |
357 cmdutil.summaryhooks.add('topic', summaryhook) |
370 |
358 |
371 if util.safehasattr(cmdutil, 'extraexport'): |
359 if util.safehasattr(cmdutil, 'extraexport'): |
372 cmdutil.extraexport.append('topic') |
360 cmdutil.extraexport.append('topic') |
373 cmdutil.extraexportmap['topic'] = _exporttopic |
361 cmdutil.extraexportmap['topic'] = _exporttopic |