comparison mercurial/hgweb/request.py @ 36868:8ddb5c354906

hgweb: expose repo name on parsedrequest I'm not a fan of doing this because I want to find a better solution to the REPO_NAME hack. But this change gets us a few steps closer to eliminating use of wsgirequest. We can worry about fixing REPO_NAME once wsgirequest is gone. Differential Revision: https://phab.mercurial-scm.org/D2784
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 10 Mar 2018 14:06:58 -0800
parents a755fd3b7146
children 16499427f6de
comparison
equal deleted inserted replaced
36867:a755fd3b7146 36868:8ddb5c354906
142 # URL path component (no query string) used for dispatch. 142 # URL path component (no query string) used for dispatch.
143 dispatchpath = attr.ib() 143 dispatchpath = attr.ib()
144 # Whether there is a path component to this request. This can be true 144 # Whether there is a path component to this request. This can be true
145 # when ``dispatchpath`` is empty due to REPO_NAME muckery. 145 # when ``dispatchpath`` is empty due to REPO_NAME muckery.
146 havepathinfo = attr.ib() 146 havepathinfo = attr.ib()
147 # The name of the repository being accessed.
148 reponame = attr.ib()
147 # Raw query string (part after "?" in URL). 149 # Raw query string (part after "?" in URL).
148 querystring = attr.ib() 150 querystring = attr.ib()
149 # multidict of query string parameters. 151 # multidict of query string parameters.
150 qsparams = attr.ib() 152 qsparams = attr.ib()
151 # wsgiref.headers.Headers instance. Operates like a dict with case 153 # wsgiref.headers.Headers instance. Operates like a dict with case
280 remoteuser=env.get('REMOTE_USER'), 282 remoteuser=env.get('REMOTE_USER'),
281 remotehost=env.get('REMOTE_HOST'), 283 remotehost=env.get('REMOTE_HOST'),
282 apppath=apppath, 284 apppath=apppath,
283 dispatchparts=dispatchparts, dispatchpath=dispatchpath, 285 dispatchparts=dispatchparts, dispatchpath=dispatchpath,
284 havepathinfo='PATH_INFO' in env, 286 havepathinfo='PATH_INFO' in env,
287 reponame=env.get('REPO_NAME'),
285 querystring=querystring, 288 querystring=querystring,
286 qsparams=qsparams, 289 qsparams=qsparams,
287 headers=headers, 290 headers=headers,
288 bodyfh=bodyfh) 291 bodyfh=bodyfh)
289 292