[PATCH 01 of 10] revlog: split a `_revisiondata` method to file `revision` job

Gregory Szorc gregory.szorc at gmail.com
Sat Aug 10 16:32:40 EDT 2019


On Wed, Aug 7, 2019 at 2:44 PM Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> # Date 1565190888 -7200
> #      Wed Aug 07 17:14:48 2019 +0200
> # Node ID 3b49bb04851ea501f005e7a58403fee3b1c52958
> # Parent  4710384df490f426ba53055537b16030dc61d957
> # EXP-Topic rawdata
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 3b49bb04851e
> revlog: split a `_revisiondata` method to file `revision` job
>

Queued this series. Sorry it took me an extra few days to look at it. I
anticipate reviewing the revision flags series too, because the handling of
flags has irked me a bit from a storage interface perspective...


>
> We are about to introduce more public method to access revision data (eg:
> `rawdata`). revset subclass tend to recursively call `revision` which will
> create all kind of issue with the coming series. To avoid them we
> introduce an
> explicit difference between the internal call and the public all. This
> will be
> useful for later work anyway (so the subclass issue is just moving it
> earlier in
> the series). I am not sure if the subclass are actually doing something
> sensible. However, I am certain I don't want to be rabbit holed into
> figuring it
> out right now.
>
> diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> --- a/mercurial/revlog.py
> +++ b/mercurial/revlog.py
> @@ -1651,6 +1651,9 @@ class revlog(object):
>          treated as raw data when applying flag transforms. 'raw' should
> be set
>          to True when generating changegroups or in debug commands.
>          """
> +        return self._revisiondata(nodeorrev, _df, raw=raw)
> +
> +    def _revisiondata(self, nodeorrev, _df=None, raw=False):
>          if isinstance(nodeorrev, int):
>              rev = nodeorrev
>              node = self.node(rev)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190810/84f978f7/attachment.html>


More information about the Mercurial-devel mailing list