Patchwork [22,of,23,Series-D] hgweb: protect filelog revnav from filtering related crash

mail settings
Submitter Pierre-Yves David
Date Jan. 11, 2013, 12:24 a.m.
Message ID <e1cdae2adebfbf5dcbf4.1357863847@yamac.lan>
Download mbox | patch
Permalink /patch/540/
State Superseded
Headers show


Pierre-Yves David - Jan. 11, 2013, 12:24 a.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1357843043 -3600
# Node ID e1cdae2adebfbf5dcbf401d70ebd69d129f63195
# Parent  09f2069e0b9e51d35b07726b0c38b83b52835377
hgweb: protect filelog revnav from filtering related crash

As explained in 518c1403838f linkrev is broken with filtering. This changeset
use an unfiltered repo to retrieve any node from a link rev.

Like the previous changesets and 518c1403838f, This will prevent traceback on
filtered repository. This changeset result in an incorrect behaviors, Navigation
link may point to missing revision. However this bad navigation
generation is much better than a plain crash


diff --git a/mercurial/hgweb/ b/mercurial/hgweb/
--- a/mercurial/hgweb/
+++ b/mercurial/hgweb/
@@ -113,11 +113,11 @@  class filerevnav(revnav):
         :repo: repo object we generate nav for
         :path: path of the file we generate nav for
         # used for iteration
-        self._hl = repo.changelog
+        self._hl = repo.unfiltered().changelog
         # used for hex generation = repo.file(path)
     def hex(self, rev):
         return hex(self._hl.node(