[PATCH 3 of 4 v5] revlog: REVIDX_ISSTOREDEXTERNALLY flag

Rémi Chaintron remi.chaintron at gmail.com
Fri Dec 16 17:08:50 EST 2016


My bad, this is an artifact from merging on some other work and isn't used
in any capacity in the current design.
Notes for removal!
On Fri, 16 Dec 2016 at 20:47, Augie Fackler <raf at durin42.com> wrote:

> On Wed, Dec 14, 2016 at 11:58:09AM +0000, Remi Chaintron wrote:
> > # HG changeset patch
> > # User Remi Chaintron <remi at fb.com>
> > # Date 1481715180 0
> > #      Wed Dec 14 11:33:00 2016 +0000
> > # Branch stable
> > # Node ID 217f7db4dae3309bec78e27c85cc90e924b109be
> > # Parent  f4cd0db914fa6df17fdb733cdcf8b18ec79f8c0c
> > revlog: REVIDX_ISSTOREDEXTERNALLY flag
> >
> > Add the REVIDX_ISSTOREDEXTERNALLY flag, for extensions to register
> transforms on
> > in REVIDX_FLAGS_TRANSFORMS. This will be used by the `lfs` extension to
> read
> > filelog data from the remote store.
> >
> > diff --git a/mercurial/help/internals/revlogs.txt
> b/mercurial/help/internals/revlogs.txt
> > --- a/mercurial/help/internals/revlogs.txt
> > +++ b/mercurial/help/internals/revlogs.txt
> > @@ -88,7 +88,9 @@
> >  0-5 (6 bytes)
> >     Absolute offset of revision data from beginning of revlog.
> >  6-7 (2 bytes)
> > -   Bit flags impacting revision behavior.
> > +   Bit flags impacting revision behavior. The following bit offsets
> define:
> > +   0: 'censored' flag.
> > +   1: 'storedexternally' flag.
> >  8-11 (4 bytes)
> >     Compressed length of revision data / chunk as stored in revlog.
> >  12-15 (4 bytes)
> > diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> > --- a/mercurial/revlog.py
> > +++ b/mercurial/revlog.py
> > @@ -54,15 +54,16 @@
> >
> >  # revlog index flags
> >  REVIDX_ISCENSORED = (1 << 15) # revision has censor metadata, must be
> verified
> > +REVIDX_ISSTOREDEXTERNALLY = (1 << 14) # revision data is stored
> externally
> >  REVIDX_DEFAULT_FLAGS = 0
> > -REVIDX_KNOWN_FLAGS = REVIDX_ISCENSORED
> > +REVIDX_KNOWN_FLAGS = REVIDX_ISCENSORED | REVIDX_ISSTOREDEXTERNALLY
> >  # stable order in which flags need to be processed and their transforms
> applied
> >  REVIDX_FLAGS_ORDER = [
> >      REVIDX_ISCENSORED,
> > +    REVIDX_ISSTOREDEXTERNALLY,
> >  ]
> >  REVIDX_FLAGS_TRANSFORMS = { }
> >
> > -
> >  # max size of revlog with inline data
> >  _maxinline = 131072
> >  _chunksize = 1048576
> > @@ -1716,6 +1717,10 @@
> >          """Check if a file revision is censored."""
> >          return False
> >
> > +    def islargefile(self, rev):
> > +        """Check if a file revision is flagged as large."""
> > +        return self.flags(rev) & REVIDX_ISLARGEFILE
>
> NameError: REVIDX_ISLARGEFILE
>
> > +
> >      def _peek_iscensored(self, baserev, delta, flush):
> >          """Quickly check if a delta produces a censored revision."""
> >          return False
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-- 
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20161216/18838ab6/attachment.html>


More information about the Mercurial-devel mailing list