Mercurial > hg > mercurial-crew
changeset 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 | 56ca4443a343 |
files | mercurial/hgweb/webutil.py tests/test-obsolete.t |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -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:
--- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -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'