Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/request.py @ 36874: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 |
line wrap: on
line diff
--- a/mercurial/hgweb/request.py Sat Mar 10 14:00:40 2018 -0800 +++ b/mercurial/hgweb/request.py Sat Mar 10 14:06:58 2018 -0800 @@ -144,6 +144,8 @@ # Whether there is a path component to this request. This can be true # when ``dispatchpath`` is empty due to REPO_NAME muckery. havepathinfo = attr.ib() + # The name of the repository being accessed. + reponame = attr.ib() # Raw query string (part after "?" in URL). querystring = attr.ib() # multidict of query string parameters. @@ -282,6 +284,7 @@ apppath=apppath, dispatchparts=dispatchparts, dispatchpath=dispatchpath, havepathinfo='PATH_INFO' in env, + reponame=env.get('REPO_NAME'), querystring=querystring, qsparams=qsparams, headers=headers,