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
--- 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'