util: remove the copypasta unquote function
The _urlunquote function was added back in the day to improve startup
performance, but this version is a) not compatible with Python 3 and b) has
quadratic performance issues that Python core solved eons ago.
Moreover, the function moved from urllib to urlparse (cheaper to import) *and*
that module is already imported into pycompat. As a result, removing this
function improves perf now.
Before:
! wall 0.066773 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
After:
! wall 0.065990 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
# An example WSGI for use with mod_wsgi, edit as necessary
# See https://mercurial-scm.org/wiki/modwsgi for more information
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"
# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
#import sys; sys.path.insert(0, "/path/to/python/lib")
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()
# enable demandloading to reduce startup time
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb
application = hgweb(config)