Bug 3812 - applied secret mq patches crash hgweb
Summary: applied secret mq patches crash hgweb
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: mq (show other bugs)
Version: earlier
Hardware: PC All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 14:53 UTC by Angel Ezquerra
Modified: 2017-11-01 18:05 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angel Ezquerra 2013-02-08 14:53 UTC
The traceback is as follows (sorry for the weird wrapping, blame Microsoft :-)

Traceback (most recent call last):
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\hgweb\server.py",
 line 77, in do_POST
    self.do_write()
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\hgweb\server.py",
 line 70, in do_write
    self.do_hgweb()
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\hgweb\server.py",
 line 137, in do_hgweb
    for chunk in self.server.application(env, self._start_response):
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\util.py", line 32
7, in increasingchunks
    for chunk in source:
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\templater.py", li
ne 315, in _flatten
    for j in _flatten(i):
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\templater.py", li
ne 308, in _flatten
    for i in thing:
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\templater.py", li
ne 184, in runmap
    for i in d:
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\hgweb\webcommands
.py", line 223, in changelist
    "tags": webutil.nodetagsdict(web.repo, n),
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\hgweb\webutil.py"
, line 149, in nodetagsdict
    return [{"name": i} for i in repo.nodetags(node)]
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\localrepo.py", li
ne 616, in nodetags
    if not self._tagscache.nodetagscache:
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\util.py", line 24
6, in __get__
    result = self.func(obj)
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\localrepo.py", li
ne 539, in _tagscache
    cache.tags, cache.tagtypes = self._findtags()
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\hgext\mq.py", line 3459, in
 _findtags
    mqtags.append((self.changelog.parents(mqtags[0][0])[0], 'qparent'))
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\revlog.py", line
315, in parents
    d = i[self.rev(node)]
  File "C:\Users\Angel\Documents\Repositories\hg-2.4\mercurial\changelog.py", li
ne 186, in rev
    raise error.LookupError(node, self.indexfile, _('no node'))
LookupError: 00changelog.i@344cc3601e99: no node
Comment 1 Pierre-Yves David 2013-02-08 14:54 UTC
mq is injecting tags without any consideration for the filtering. The tag template then crash.
Comment 2 HG Bot 2013-02-16 19:45 UTC
Fixed by http://selenic.com/repo/hg/rev/c5f7e83d47cd
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
mq: comply with filtering when injecting fake tags (issue3812)

mq was injecting fake tags whenever the revisions were accessible
to the filtering level.

This issue impacts hgweb since it's common to have "secret" mq
patches. As secret changesets are filtered by hgweb, the tags
computation could break.

(please test the fix)