Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webutil.py @ 18426:01638b51df44
hgweb: ignore filtered revision in revnav
This changeset checks that a revision is known before adding it to the
navigation.
This will prevent traceback on filtered repository. This changeset result in an
incorrect behaviors, Navigation link may be dropped without any replacement.
However this bad navigation generation is much better than a crash
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 16 Jan 2013 14:19:28 +0100 |
parents | 6da1e979340a |
children | 7f769d3a8ad2 |
comparison
equal
deleted
inserted
replaced
18425:6da1e979340a | 18426:01638b51df44 |
---|---|
86 targets.sort() | 86 targets.sort() |
87 | 87 |
88 navbefore = [("(0)", self.hex(0))] | 88 navbefore = [("(0)", self.hex(0))] |
89 navafter = [] | 89 navafter = [] |
90 for rev in targets: | 90 for rev in targets: |
91 if rev not in self._revlog: | |
92 continue | |
91 if pos < rev < limit: | 93 if pos < rev < limit: |
92 navafter.append(("+%d" % f, self.hex(rev))) | 94 navafter.append(("+%d" % f, self.hex(rev))) |
93 if 0 < rev < pos: | 95 if 0 < rev < pos: |
94 navbefore.append(("-%d" % f, self.hex(rev))) | 96 navbefore.append(("-%d" % f, self.hex(rev))) |
95 | 97 |