# HG changeset patch # User Pierre-Yves David # Date 1695675121 -7200 # Node ID 33d2f0164d0d248fd887d64b939a493db04f1373 # Parent 006aee5ffd35197cf3ef23bba7e9000dfecad7bb revlog: drop the df argument to `revision` The intend of this argument is better filled by the `revlog.reading` or `revlog._writing` context. So we drop it to leave rooms for further cleanup and improvements. diff -r 006aee5ffd35 -r 33d2f0164d0d mercurial/filelog.py --- a/mercurial/filelog.py Tue Sep 26 01:05:02 2023 +0200 +++ b/mercurial/filelog.py Mon Sep 25 22:52:01 2023 +0200 @@ -107,8 +107,8 @@ def iscensored(self, rev): return self._revlog.iscensored(rev) - def revision(self, node, _df=None): - return self._revlog.revision(node, _df=_df) + def revision(self, node): + return self._revlog.revision(node) def rawdata(self, node, _df=None): return self._revlog.rawdata(node, _df=_df) diff -r 006aee5ffd35 -r 33d2f0164d0d mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py Tue Sep 26 01:05:02 2023 +0200 +++ b/mercurial/interfaces/repository.py Mon Sep 25 22:52:01 2023 +0200 @@ -1282,7 +1282,7 @@ def linkrev(rev): """Obtain the changeset revision number a revision is linked to.""" - def revision(node, _df=None): + def revision(node): """Obtain fulltext data for a node.""" def rawdata(node, _df=None): diff -r 006aee5ffd35 -r 33d2f0164d0d mercurial/manifest.py --- a/mercurial/manifest.py Tue Sep 26 01:05:02 2023 +0200 +++ b/mercurial/manifest.py Mon Sep 25 22:52:01 2023 +0200 @@ -1821,8 +1821,8 @@ def checksize(self): return self._revlog.checksize() - def revision(self, node, _df=None): - return self._revlog.revision(node, _df=_df) + def revision(self, node): + return self._revlog.revision(node) def rawdata(self, node, _df=None): return self._revlog.rawdata(node, _df=_df) diff -r 006aee5ffd35 -r 33d2f0164d0d mercurial/revlog.py --- a/mercurial/revlog.py Tue Sep 26 01:05:02 2023 +0200 +++ b/mercurial/revlog.py Mon Sep 25 22:52:01 2023 +0200 @@ -1954,13 +1954,11 @@ return mdiff.textdiff(self.rawdata(rev1), self.rawdata(rev2)) - def revision(self, nodeorrev, _df=None): + def revision(self, nodeorrev): """return an uncompressed revision of a given node or revision number. - - _df - an existing file handle to read from. (internal-only) """ - return self._revisiondata(nodeorrev, _df) + return self._revisiondata(nodeorrev) def sidedata(self, nodeorrev, _df=None): """a map of extra data related to the changeset but not part of the hash