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.
--- 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.