[PATCH 1 of 7 clfilter part 1 V3] clfilter: ensure context raise RepoLookupError when the revision is filtered

Idan Kamara idankk86 at gmail.com
Thu Jan 10 16:56:34 CST 2013


On Mon, Dec 17, 2012 at 6:50 PM, <pierre-yves.david at logilab.fr> wrote:
>
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1354489919 -3600
> # Node ID e954ac5321a9ead1a4e687385dca7134218ccc83
> # Parent  8c9a52492d426741ab24392d49f44a1d4f23613e
> clfilter: ensure context raise RepoLookupError when the revision is
> filtered
>
> Currently the code path of `changectx(filteredrepo, rev)` call
> `filteredrepo.changelog.node(rev)`. When `rev` is filtered this raise an
> unhandled `IndexError`. This case now raise a `RepoLookupError` as other
> error case do.

This isn't sufficient for all the other code paths in here, e.g.
'hg log -r filtered-rev' tracebacks with an IndexError
since it hits this path:

http://selenic.com/repo/hg/file/5db16424142c/mercurial/context.py#l68

It probably applies to some of other calls to changelog
in here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130111/8df0dd06/attachment.html>


More information about the Mercurial-devel mailing list