hgext/infinitepush/__init__.py
changeset 37785 b4d85bc122bd
parent 37615 f3dc8239e3a9
child 37792 33d26f7bd6ca
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):