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

Matt Mackall mpm at selenic.com
Wed Apr 29 16:24:52 CDT 2015


On Wed, 2015-04-29 at 14:17 -0700, Pierre-Yves David wrote:
> 
> 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.

Queued, thanks guys!

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list