diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -88,6 +88,8 @@ class revnav(object): 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 --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -679,16 +679,15 @@ check hgweb does not explode $ 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'