Closed Bug 1248850 Opened 8 years ago Closed 8 years ago

TemplateNotFound: "changelogtag" not in template map

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

Found a bug in the new web API deployed in bug 1247802.

[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210] Traceback (most recent call last):
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgweb_mod.py", line 281, in run_wsgi
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     for r in self._runwsgi(req, repo):
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/version-control-tools/hgext/serverlog/__init__.py", line 273, in _runwsgi
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     for what in super(hgwebwrapped, self)._runwsgi(req, repo):
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/hgweb_mod.py", line 396, in _runwsgi
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     content = getattr(webcommands, cmd)(rctx, req, tmpl)
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/version-control-tools/hgext/hgmo/__init__.py", line 380, in automationrelevancewebcommand
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     entry[k] = list(v)
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/hgweb/webutil.py", line 197, in showtag
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     yield tmpl(t1, tag=t, **args)
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 920, in __call__
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     stream = proc.process(t, mapping)
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 827, in process
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     return _flatten(runtemplate(self, mapping, self._load(t)))
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 820, in _load
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     self._cache[t] = compiletemplate(self._loader(t), self)
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]   File "/repo/hg/venv_hgweb/lib/python2.7/site-packages/mercurial/templater.py", line 907, in load
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210]     inst.args[0])
[Wed Feb 17 03:34:55 2016] [error] [client 10.22.74.210] TemplateNotFound: "changelogtag" not in template map
This is a very hacky way to avoid a templating issue due to changelogtag
missing. Fixing the underlying issue requires handling special return
values from Mercurial's internal templating API and I have little
desire to do that because those APIs are fragile. It is easier to just
remove the output that calls into them to avoid the problem.

Review commit: https://reviewboard.mozilla.org/r/35219/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/35219/
Attachment #8720120 - Flags: review?(dminor)
Comment on attachment 8720120 [details]
MozReview Request: hgmo: prune some keys from the returned JSON (bug 1248850); r?dminor

https://reviewboard.mozilla.org/r/35219/#review31911
Attachment #8720120 - Flags: review?(dminor) → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: