Open Bug 1482144 Opened 7 years ago Updated 6 years ago

hg.mozilla.org/<somerepo>/pushes returns '"pushes1" not in template map'

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: sheehan, Unassigned)

Details

I realized this while attempting to consolidate pushlog and pushlog-legacy into a single extension. Simply append "/pushes" to any repo url on hg.mozilla.org (https://hg.mozilla.org/mozilla-central/pushes as an example) and the server returns a 500. I managed to dig through the logs and find this traceback as the root cause: Traceback (most recent call last): File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgwebdir_mod.py", line 351, in run_wsgi for r in self._runwsgi(req, res): File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgweb_mod.py", line 308, in run_wsgi for r in self._runwsgi(req, res, repo): File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 473, in _runwsgi for what in super(hgwebwrapped, self)._runwsgi(*args): File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgweb_mod.py", line 428, in _runwsgi return getattr(webcommands, cmd)(rctx) File "/var/hg/version-control-tools/hgext/pushlog/feed.py", line 603, in pushes return web.sendtemplate(template, **data) File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgweb_mod.py", line 196, in sendtemplate self.res.setbodygen(self.tmpl.generate(name, kwargs)) File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 869, in generate stream = proc.process(t, mapping) File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 698, in process func, data = self._load(t) File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 670, in _load x = parse(self._loader(t)) File "/var/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 840, in load _('"%s" not in template map') % inst.args[0]) TemplateNotFound: "pushes1" not in template map I'm still not entirely sure what happens at the template layer here, but I'm pretty sure this should return a rendered "error" page, similar to appending some garbage to the end of a repo name (https://hg.mozilla.org/mozilla-central/asdfasdf as an example).
This is kinda known and due to the pushlog web commands not using templates properly. We can talk about this in our 1:1 in ~15 minutes.
It seems that the recent pushlog template changes (or the Mercurial upgrades, not sure which) have fixed the 500 error. We now see a rendered gitweb_mozilla page, but it is still the "error" template.
Summary: hg.mozilla.org/<somerepo>/pushes returns a 500 → hg.mozilla.org/<somerepo>/pushes returns '"pushes1" not in template map'
You need to log in before you can comment on or make changes to this bug.