[PATCH STABLE] bundlerepo: disable filtering of changelog while constructing revision text

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Apr 29 16:17:46 CDT 2015



On 04/29/2015 07:41 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1430304457 -32400
> #      Wed Apr 29 19:47:37 2015 +0900
> # Branch stable
> # Node ID 73b0e11a9cb8fea9b4f0a4ce4267409e8f2054cd
> # Parent  cc497780eaf9c191564c64b40ca549f706c62724
> bundlerepo: disable filtering of changelog while constructing revision text
>
> This avoids the following error that happened if base revision of bundle file
> was hidden. bundlerevlog needs it to construct revision texts from bundle
> content as revlog.revision() does.
>
>    File "mercurial/context.py", line 485, in _changeset
>      return self._repo.changelog.read(self.rev())
>    File "mercurial/changelog.py", line 319, in read
>      text = self.revision(node)
>    File "mercurial/bundlerepo.py", line 124, in revision
>      text = self.baserevision(iterrev)
>    File "mercurial/bundlerepo.py", line 160, in baserevision
>      return changelog.changelog.revision(self, nodeorrev)
>    File "mercurial/revlog.py", line 1041, in revision
>      node = self.node(rev)
>    File "mercurial/changelog.py", line 211, in node
>      raise error.FilteredIndexError(rev)
>    mercurial.error.FilteredIndexError: 1

The issue is real and the fix seems to be working, but it cross my eyes 
a bit.

 From what I understand, baserevision will never be called it the 
revision is in the repository already. So, there there is alway a chain 
to apply (so the bypass of filtering for revision X will never be used 
for accessing revision X text itself?

I would be happier if we could just call the unfiltered changelog, but 
this seems impractical.

So the change seems okay to me, I'll let Matt queue it.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list