changeset 42718:389233789952

revlog: split a `_revisiondata` method to file `revision` job 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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 07 Aug 2019 17:14:48 +0200
parents 0a4303c77637
children 415e4136d326
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jul 24 18:32:36 2019 +0530
+++ b/mercurial/revlog.py	Wed Aug 07 17:14:48 2019 +0200
@@ -1651,6 +1651,9 @@
         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)