comparison mercurial/wireproto.py @ 36071:038bcb759b75

wireproto: remove unused proto argument from supportedcompengines (API) In theory, the protocol should be passed to this function. But the argument isn't being used and it is getting in the way of refactoring. So let's remove it. We can always add it back later if we need it again. Differential Revision: https://phab.mercurial-scm.org/D2086
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 07 Feb 2018 20:22:44 -0800
parents 90ca4986616c
children cd6ab329c5c7
comparison
equal deleted inserted replaced
36070:90ca4986616c 36071:038bcb759b75
585 if v is not None: 585 if v is not None:
586 return v 586 return v
587 587
588 return ui.configbool('server', 'bundle1') 588 return ui.configbool('server', 'bundle1')
589 589
590 def supportedcompengines(ui, proto, role): 590 def supportedcompengines(ui, role):
591 """Obtain the list of supported compression engines for a request.""" 591 """Obtain the list of supported compression engines for a request."""
592 assert role in (util.CLIENTROLE, util.SERVERROLE) 592 assert role in (util.CLIENTROLE, util.SERVERROLE)
593 593
594 compengines = util.compengines.supportedwireengines(role) 594 compengines = util.compengines.supportedwireengines(role)
595 595
822 822
823 # FUTURE advertise 0.2rx once support is implemented 823 # FUTURE advertise 0.2rx once support is implemented
824 # FUTURE advertise minrx and mintx after consulting config option 824 # FUTURE advertise minrx and mintx after consulting config option
825 caps.append('httpmediatype=0.1rx,0.1tx,0.2tx') 825 caps.append('httpmediatype=0.1rx,0.1tx,0.2tx')
826 826
827 compengines = supportedcompengines(repo.ui, proto, util.SERVERROLE) 827 compengines = supportedcompengines(repo.ui, util.SERVERROLE)
828 if compengines: 828 if compengines:
829 comptypes = ','.join(urlreq.quote(e.wireprotosupport().name) 829 comptypes = ','.join(urlreq.quote(e.wireprotosupport().name)
830 for e in compengines) 830 for e in compengines)
831 caps.append('compression=%s' % comptypes) 831 caps.append('compression=%s' % comptypes)
832 832