comparison hgext/infinitepush/__init__.py @ 37785:b4d85bc122bd

wireproto: rename wireproto to wireprotov1server (API) We have wireprotov2server, wireprotov1peer, and wireprotov2peer. wireproto only contains server functionality. So it makes sense to rename it to wireprotov1server so the naming aligns with everything else. Differential Revision: https://phab.mercurial-scm.org/D3400
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 16 Apr 2018 22:21:54 -0700
parents f3dc8239e3a9
children 33d26f7bd6ca
comparison
equal deleted inserted replaced
37784:ee0d5e9d77b2 37785:b4d85bc122bd
123 phases, 123 phases,
124 pushkey, 124 pushkey,
125 pycompat, 125 pycompat,
126 registrar, 126 registrar,
127 util, 127 util,
128 wireproto,
129 wireprototypes, 128 wireprototypes,
130 wireprotov1peer, 129 wireprotov1peer,
130 wireprotov1server,
131 ) 131 )
132 132
133 from . import ( 133 from . import (
134 bundleparts, 134 bundleparts,
135 common, 135 common,
276 serverextsetup(ui) 276 serverextsetup(ui)
277 else: 277 else:
278 clientextsetup(ui) 278 clientextsetup(ui)
279 279
280 def commonsetup(ui): 280 def commonsetup(ui):
281 wireproto.commands['listkeyspatterns'] = ( 281 wireprotov1server.commands['listkeyspatterns'] = (
282 wireprotolistkeyspatterns, 'namespace patterns') 282 wireprotolistkeyspatterns, 'namespace patterns')
283 scratchbranchpat = ui.config('infinitepush', 'branchpattern') 283 scratchbranchpat = ui.config('infinitepush', 'branchpattern')
284 if scratchbranchpat: 284 if scratchbranchpat:
285 global _scratchbranchmatcher 285 global _scratchbranchmatcher
286 kind, pat, _scratchbranchmatcher = \ 286 kind, pat, _scratchbranchmatcher = \
300 newphaseheadshandler.params = orighandlephasehandler.params 300 newphaseheadshandler.params = orighandlephasehandler.params
301 bundle2.parthandlermapping['phase-heads'] = newphaseheadshandler 301 bundle2.parthandlermapping['phase-heads'] = newphaseheadshandler
302 302
303 extensions.wrapfunction(localrepo.localrepository, 'listkeys', 303 extensions.wrapfunction(localrepo.localrepository, 'listkeys',
304 localrepolistkeys) 304 localrepolistkeys)
305 wireproto.commands['lookup'] = ( 305 wireprotov1server.commands['lookup'] = (
306 _lookupwrap(wireproto.commands['lookup'][0]), 'key') 306 _lookupwrap(wireprotov1server.commands['lookup'][0]), 'key')
307 extensions.wrapfunction(exchange, 'getbundlechunks', getbundlechunks) 307 extensions.wrapfunction(exchange, 'getbundlechunks', getbundlechunks)
308 308
309 extensions.wrapfunction(bundle2, 'processparts', processparts) 309 extensions.wrapfunction(bundle2, 'processparts', processparts)
310 310
311 def clientextsetup(ui): 311 def clientextsetup(ui):