[PATCH] revlog: use raw revision for rawsize
Jun Wu
quark at fb.com
Wed Mar 29 14:12:36 EDT 2017
Excerpts from Ryan McElroy's message of 2017-03-29 11:30:50 +0100:
> On 3/29/17 4:31 AM, Jun Wu wrote:
> > # HG changeset patch
> > # User Jun Wu <quark at fb.com>
> > # Date 1490758201 25200
> > # Tue Mar 28 20:30:01 2017 -0700
> > # Node ID 5c6ebe1cd99e9557b61ef51ed88e335ac87df8da
> > # Parent 31073077267b5e330925d48098dd6e0fd28bdd8e
> > revlog: use raw revision for rawsize
> >
> > diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> > --- a/mercurial/revlog.py
> > +++ b/mercurial/revlog.py
> > @@ -439,5 +439,5 @@ class revlog(object):
> > return l
> >
> > - t = self.revision(self.node(rev))
> > + t = self.revision(self.node(rev), raw=True)
> > return len(t)
> > size = rawsize
> >
>
> Having looked at the code, this is inside the "rawsize" function so this
> is an obviously correct fix. I have marked pre-reviewed in patchwork.
>
> Is there anywhere this gets exposed today? Maybe a test would be nice in
> the future.
Since the index will handle most cases, it seems not easy to get exposed
unless index returns 0.
More information about the Mercurial-devel
mailing list