Mercurial > hg-stable
changeset 35898:1b76a9e0a9de
wireprotoserver: don't import symbol from hgweb.common
Importing hgweb.common requires importing hgweb.
hgweb/__init__.py contains a bit of code and does imports of large
parts of the hgweb.* module tree.
All we need is a constant defining the integer status code for
HTTP OK. So just redefine HTTP_OK in wireprotoserver.py and avoid
the excessive imports.
Differential Revision: https://phab.mercurial-scm.org/D1967
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 31 Jan 2018 11:13:11 -0800 |
parents | a42455b3dbf8 |
children | 1bf5263fe5cc |
files | mercurial/wireprotoserver.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py Wed Jan 31 10:41:27 2018 -0800 +++ b/mercurial/wireprotoserver.py Wed Jan 31 11:13:11 2018 -0800 @@ -9,9 +9,6 @@ import cgi import struct -from .hgweb.common import ( - HTTP_OK, -) from . import ( error, pycompat, @@ -24,6 +21,8 @@ urlerr = util.urlerr urlreq = util.urlreq +HTTP_OK = 200 + HGTYPE = 'application/mercurial-0.1' HGTYPE2 = 'application/mercurial-0.2' HGERRTYPE = 'application/hg-error'