# HG changeset patch # User Pierre-Yves David # Date 1358342368 -3600 # Node ID 01638b51df4482837fbaebc3963dba1669c882b0 # Parent 6da1e979340a50c0cca0cd0b4f40a6f43a5b95a1 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 diff -r 6da1e979340a -r 01638b51df44 mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Thu Jan 10 19:29:48 2013 +0100 +++ b/mercurial/hgweb/webutil.py Wed Jan 16 14:19:28 2013 +0100 @@ -88,6 +88,8 @@ navbefore = [("(0)", self.hex(0))] navafter = [] for rev in targets: + if rev not in self._revlog: + continue if pos < rev < limit: navafter.append(("+%d" % f, self.hex(rev))) if 0 < rev < pos: diff -r 6da1e979340a -r 01638b51df44 tests/test-obsolete.t --- a/tests/test-obsolete.t Thu Jan 10 19:29:48 2013 +0100 +++ b/tests/test-obsolete.t Wed Jan 16 14:19:28 2013 +0100 @@ -679,16 +679,15 @@ $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log $ cat hg.pid >> $DAEMON_PIDS -#check changelog view -# -# $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/' -# 200 Script output follows +check changelog view + + $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/' + 200 Script output follows #check graph view # # $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph' # 200 Script output follows - check filelog view $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar'