comparison mercurial/commands.py @ 30762:35b516f800e0

wireproto: advertise supported media types and compression formats This commit introduces support for advertising a server's support for media types and compression formats in accordance with the spec defined in internals.wireproto. The bulk of the new code is a helper function in wireproto.py to obtain a prioritized list of compression engines available to the wire protocol. While not utilized yet, we implement support for obtaining the list of compression engines advertised by the client. The upcoming HTTP protocol enhancements are a bit lower-level than existing tests (most existing tests are command centric). So, this commit establishes a new test file that will be appropriate for holding tests around the functionality of the HTTP protocol itself. Rounding out this change, `hg debuginstall` now prints compression engines available to the server.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 24 Dec 2016 15:21:46 -0700
parents 76104a4899ad
children 301512fd6852
comparison
equal deleted inserted replaced
30761:7283719e2bfd 30762:35b516f800e0
1957 fm.write('compenginesavail', _('checking available compression engines ' 1957 fm.write('compenginesavail', _('checking available compression engines '
1958 '(%s)\n'), 1958 '(%s)\n'),
1959 fm.formatlist(sorted(e.name() for e in compengines 1959 fm.formatlist(sorted(e.name() for e in compengines
1960 if e.available()), 1960 if e.available()),
1961 name='compengine', fmt='%s', sep=', ')) 1961 name='compengine', fmt='%s', sep=', '))
1962 wirecompengines = util.compengines.supportedwireengines(util.SERVERROLE)
1963 fm.write('compenginesserver', _('checking available compression engines '
1964 'for wire protocol (%s)\n'),
1965 fm.formatlist([e.name() for e in wirecompengines
1966 if e.wireprotosupport()],
1967 name='compengine', fmt='%s', sep=', '))
1962 1968
1963 # templates 1969 # templates
1964 p = templater.templatepaths() 1970 p = templater.templatepaths()
1965 fm.write('templatedirs', 'checking templates (%s)...\n', ' '.join(p)) 1971 fm.write('templatedirs', 'checking templates (%s)...\n', ' '.join(p))
1966 fm.condwrite(not p, '', _(" no template directories found\n")) 1972 fm.condwrite(not p, '', _(" no template directories found\n"))