compat: drop hack around http request handling for 4.6
The approach we used in 4.5 works again :-)
--- a/hgext3rd/evolve/obsexchange.py Wed Mar 14 02:08:53 2018 +0100
+++ b/hgext3rd/evolve/obsexchange.py Wed Mar 14 02:32:08 2018 +0100
@@ -29,7 +29,7 @@
try:
from mercurial import wireprotoserver
- wireprotoserver.parsehttprequest
+ wireprotoserver.handlewsgirequest
except ImportError:
wireprotoserver = None
@@ -236,27 +236,6 @@
raise err
return {}
-if wireprotoserver is not None:
- # reinstall dispatch catching ResponseError as in hg 4.5 <
- @eh.wrapfunction(wireprotoserver, 'parsehttprequest')
- def parsehttprequest(orig, repo, req, query):
- protohandler = orig(repo, req, query)
- olddispatch = protohandler['dispatch']
-
- def newdispatch(*args, **kwargs):
- try:
- return olddispatch(*args, **kwargs)
- except hgwebcommon.ErrorResponse as inst:
- if protohandler['cmd'] != 'listkeys':
- raise
- req.headers.append((r'Connection', r'Close'))
- req.respond(inst, wireprotoserver.HGTYPE,
- body='0\n%s\n' % inst)
- return ''
-
- protohandler['dispatch'] = newdispatch
- return protohandler
-
@eh.uisetup
def setuppushkeyforbidding(ui):
pushkey._namespaces['obsolete'] = (forbidpushkey, forbidlistkey)