This is an archive of the discontinued Mercurial Phabricator instance.

wireprotoserver: don't import symbol from hgweb.common
ClosedPublic

Authored by indygreg on Feb 1 2018, 3:19 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Feb 1 2018, 3:19 PM
durin42 accepted this revision.Feb 1 2018, 5:44 PM
This revision is now accepted and ready to land.Feb 1 2018, 5:44 PM
This revision was automatically updated to reflect the committed changes.