Mercurial > hg
comparison mercurial/hgweb/request.py @ 46907:ffd3e823a7e5
urlutil: extract `url` related code from `util` into the new module
The new module is well fitting for this new code. And this will be useful to
make the gathered code collaborate more later.
Differential Revision: https://phab.mercurial-scm.org/D10374
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 12 Apr 2021 03:01:04 +0200 |
parents | d4ba4d51f85f |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
46906:33524c46a092 | 46907:ffd3e823a7e5 |
---|---|
14 from .. import ( | 14 from .. import ( |
15 encoding, | 15 encoding, |
16 error, | 16 error, |
17 pycompat, | 17 pycompat, |
18 util, | 18 util, |
19 ) | |
20 from ..utils import ( | |
21 urlutil, | |
19 ) | 22 ) |
20 | 23 |
21 | 24 |
22 class multidict(object): | 25 class multidict(object): |
23 """A dict like object that can store multiple values for a key. | 26 """A dict like object that can store multiple values for a key. |
182 # checked prior to d7fd203e36cc; keep doing so to avoid breaking them. | 185 # checked prior to d7fd203e36cc; keep doing so to avoid breaking them. |
183 if not reponame: | 186 if not reponame: |
184 reponame = env.get(b'REPO_NAME') | 187 reponame = env.get(b'REPO_NAME') |
185 | 188 |
186 if altbaseurl: | 189 if altbaseurl: |
187 altbaseurl = util.url(altbaseurl) | 190 altbaseurl = urlutil.url(altbaseurl) |
188 | 191 |
189 # https://www.python.org/dev/peps/pep-0333/#environ-variables defines | 192 # https://www.python.org/dev/peps/pep-0333/#environ-variables defines |
190 # the environment variables. | 193 # the environment variables. |
191 # https://www.python.org/dev/peps/pep-0333/#url-reconstruction defines | 194 # https://www.python.org/dev/peps/pep-0333/#url-reconstruction defines |
192 # how URLs are reconstructed. | 195 # how URLs are reconstructed. |