Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotoserver.py @ 37783:9d818539abfa
wireproto: move supportedcompengines out of wireproto
This function is used by both version 1 and version 2. It belongs in
a common module.
"wireprototypes" may not be the best module name. I may rename it...
Differential Revision: https://phab.mercurial-scm.org/D3398
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 16 Apr 2018 22:08:13 -0700 |
parents | 77c9ee77687c |
children | b4d85bc122bd |
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py Mon Apr 16 22:00:52 2018 -0700 +++ b/mercurial/wireprotoserver.py Mon Apr 16 22:08:13 2018 -0700 @@ -149,7 +149,8 @@ # FUTURE advertise minrx and mintx after consulting config option caps.append('httpmediatype=0.1rx,0.1tx,0.2tx') - compengines = wireproto.supportedcompengines(repo.ui, util.SERVERROLE) + compengines = wireprototypes.supportedcompengines(repo.ui, + util.SERVERROLE) if compengines: comptypes = ','.join(urlreq.quote(e.wireprotosupport().name) for e in compengines) @@ -329,7 +330,7 @@ # Now find an agreed upon compression format. compformats = wireproto.clientcompressionsupport(proto) - for engine in wireproto.supportedcompengines(ui, util.SERVERROLE): + for engine in wireprototypes.supportedcompengines(ui, util.SERVERROLE): if engine.wireprotosupport().name in compformats: opts = {} level = ui.configint('server', '%slevel' % engine.name())