Mercurial > hg
comparison hgext/narrow/narrowbundle2.py @ 37613:96d735601ca1
wireproto: move gboptsmap to wireprototypes and rename (API)
This is also shared between client and server and will need to
exist in a shared module when that code is split into different
modules.
Differential Revision: https://phab.mercurial-scm.org/D3258
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 11 Apr 2018 10:51:38 -0700 |
parents | f0b6fbea00cf |
children | 1ad873c3e4a4 |
comparison
equal
deleted
inserted
replaced
37612:5e71dea79aae | 37613:96d735601ca1 |
---|---|
25 exchange, | 25 exchange, |
26 extensions, | 26 extensions, |
27 narrowspec, | 27 narrowspec, |
28 repair, | 28 repair, |
29 util, | 29 util, |
30 wireproto, | 30 wireprototypes, |
31 ) | 31 ) |
32 from mercurial.utils import ( | 32 from mercurial.utils import ( |
33 stringutil, | 33 stringutil, |
34 ) | 34 ) |
35 | 35 |
459 | 459 |
460 def setup(): | 460 def setup(): |
461 """Enable narrow repo support in bundle2-related extension points.""" | 461 """Enable narrow repo support in bundle2-related extension points.""" |
462 extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) | 462 extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow) |
463 | 463 |
464 wireproto.gboptsmap['narrow'] = 'boolean' | 464 getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS |
465 wireproto.gboptsmap['depth'] = 'plain' | 465 |
466 wireproto.gboptsmap['oldincludepats'] = 'csv' | 466 getbundleargs['narrow'] = 'boolean' |
467 wireproto.gboptsmap['oldexcludepats'] = 'csv' | 467 getbundleargs['depth'] = 'plain' |
468 wireproto.gboptsmap['includepats'] = 'csv' | 468 getbundleargs['oldincludepats'] = 'csv' |
469 wireproto.gboptsmap['excludepats'] = 'csv' | 469 getbundleargs['oldexcludepats'] = 'csv' |
470 wireproto.gboptsmap['known'] = 'csv' | 470 getbundleargs['includepats'] = 'csv' |
471 getbundleargs['excludepats'] = 'csv' | |
472 getbundleargs['known'] = 'csv' | |
471 | 473 |
472 # Extend changegroup serving to handle requests from narrow clients. | 474 # Extend changegroup serving to handle requests from narrow clients. |
473 origcgfn = exchange.getbundle2partsmapping['changegroup'] | 475 origcgfn = exchange.getbundle2partsmapping['changegroup'] |
474 def wrappedcgfn(*args, **kwargs): | 476 def wrappedcgfn(*args, **kwargs): |
475 repo = args[1] | 477 repo = args[1] |