Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHGd1fccbd50fcd: hgweb: use native strings consistently for querystring parsing
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| indygreg |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/hgweb/hgweb_mod.py (2 lines) | |||
| M | mercurial/hgweb/hgwebdir_mod.py (2 lines) |
| # figure out which style to use | # figure out which style to use | ||||
| vars = {} | vars = {} | ||||
| styles, (style, mapfile) = getstyle(req, self.config, | styles, (style, mapfile) = getstyle(req, self.config, | ||||
| self.templatepath) | self.templatepath) | ||||
| if style == styles[0]: | if style == styles[0]: | ||||
| vars['style'] = style | vars['style'] = style | ||||
| start = '&' if req.url[-1] == '?' else '?' | start = r'&' if req.url[-1] == r'?' else r'?' | ||||
| sessionvars = webutil.sessionvars(vars, start) | sessionvars = webutil.sessionvars(vars, start) | ||||
| if not self.reponame: | if not self.reponame: | ||||
| self.reponame = (self.config('web', 'name', '') | self.reponame = (self.config('web', 'name', '') | ||||
| or req.env.get('REPO_NAME') | or req.env.get('REPO_NAME') | ||||
| or req.url.strip('/') or self.repo.root) | or req.url.strip('/') or self.repo.root) | ||||
| def websubfilter(text): | def websubfilter(text): | ||||
| url += '/' | url += '/' | ||||
| vars = {} | vars = {} | ||||
| styles, (style, mapfile) = hgweb_mod.getstyle(req, config, | styles, (style, mapfile) = hgweb_mod.getstyle(req, config, | ||||
| self.templatepath) | self.templatepath) | ||||
| if style == styles[0]: | if style == styles[0]: | ||||
| vars['style'] = style | vars['style'] = style | ||||
| start = '&' if url[-1] == '?' else '?' | start = r'&' if url[-1] == r'?' else r'?' | ||||
| sessionvars = webutil.sessionvars(vars, start) | sessionvars = webutil.sessionvars(vars, start) | ||||
| logourl = config('web', 'logourl') | logourl = config('web', 'logourl') | ||||
| logoimg = config('web', 'logoimg') | logoimg = config('web', 'logoimg') | ||||
| staticurl = config('web', 'staticurl') or url + 'static/' | staticurl = config('web', 'staticurl') or url + 'static/' | ||||
| if not staticurl.endswith('/'): | if not staticurl.endswith('/'): | ||||
| staticurl += '/' | staticurl += '/' | ||||
| defaults = { | defaults = { | ||||