Mercurial > hg
changeset 51023:14de15825253
revlog: drop the df argument to `rawdata`
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 26 Sep 2023 00:54:46 +0200 |
parents | 33d2f0164d0d |
children | 299b7b5440db |
files | mercurial/filelog.py mercurial/interfaces/repository.py mercurial/manifest.py mercurial/revlog.py |
diffstat | 4 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/filelog.py Mon Sep 25 22:52:01 2023 +0200 +++ b/mercurial/filelog.py Tue Sep 26 00:54:46 2023 +0200 @@ -110,8 +110,8 @@ def revision(self, node): return self._revlog.revision(node) - def rawdata(self, node, _df=None): - return self._revlog.rawdata(node, _df=_df) + def rawdata(self, node): + return self._revlog.rawdata(node) def emitrevisions( self,
--- a/mercurial/interfaces/repository.py Mon Sep 25 22:52:01 2023 +0200 +++ b/mercurial/interfaces/repository.py Tue Sep 26 00:54:46 2023 +0200 @@ -1285,7 +1285,7 @@ def revision(node): """Obtain fulltext data for a node.""" - def rawdata(node, _df=None): + def rawdata(node): """Obtain raw data for a node.""" def revdiff(rev1, rev2):
--- a/mercurial/manifest.py Mon Sep 25 22:52:01 2023 +0200 +++ b/mercurial/manifest.py Tue Sep 26 00:54:46 2023 +0200 @@ -1824,8 +1824,8 @@ def revision(self, node): return self._revlog.revision(node) - def rawdata(self, node, _df=None): - return self._revlog.rawdata(node, _df=_df) + def rawdata(self, node): + return self._revlog.rawdata(node) def revdiff(self, rev1, rev2): return self._revlog.revdiff(rev1, rev2)
--- a/mercurial/revlog.py Mon Sep 25 22:52:01 2023 +0200 +++ b/mercurial/revlog.py Tue Sep 26 00:54:46 2023 +0200 @@ -2099,12 +2099,9 @@ sidedata = sidedatautil.deserialize_sidedata(segment) return sidedata - def rawdata(self, nodeorrev, _df=None): - """return an uncompressed raw data of a given node or revision number. - - _df - an existing file handle to read from. (internal-only) - """ - return self._revisiondata(nodeorrev, _df, raw=True) + def rawdata(self, nodeorrev): + """return an uncompressed raw data of a given node or revision number.""" + return self._revisiondata(nodeorrev, raw=True) def hash(self, text, p1, p2): """Compute a node hash.