equal
deleted
inserted
replaced
18 discovery, |
18 discovery, |
19 encoding, |
19 encoding, |
20 error, |
20 error, |
21 narrowspec, |
21 narrowspec, |
22 pycompat, |
22 pycompat, |
23 util, |
|
24 wireprotoframing, |
23 wireprotoframing, |
25 wireprototypes, |
24 wireprototypes, |
26 ) |
25 ) |
27 from .utils import ( |
26 from .utils import ( |
28 cborutil, |
27 cborutil, |
484 """Obtain the set of capabilities for version 2 transports. |
483 """Obtain the set of capabilities for version 2 transports. |
485 |
484 |
486 These capabilities are distinct from the capabilities for version 1 |
485 These capabilities are distinct from the capabilities for version 1 |
487 transports. |
486 transports. |
488 """ |
487 """ |
489 compression = [] |
|
490 for engine in wireprototypes.supportedcompengines(repo.ui, util.SERVERROLE): |
|
491 compression.append({ |
|
492 b'name': engine.wireprotosupport().name, |
|
493 }) |
|
494 |
|
495 caps = { |
488 caps = { |
496 'commands': {}, |
489 'commands': {}, |
497 'compression': compression, |
|
498 'framingmediatypes': [FRAMINGTYPE], |
490 'framingmediatypes': [FRAMINGTYPE], |
499 'pathfilterprefixes': set(narrowspec.VALID_PREFIXES), |
491 'pathfilterprefixes': set(narrowspec.VALID_PREFIXES), |
500 } |
492 } |
501 |
493 |
502 for command, entry in COMMANDS.items(): |
494 for command, entry in COMMANDS.items(): |