comparison mercurial/revlog.py @ 51020: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
comparison
equal deleted inserted replaced
51019:33d2f0164d0d 51020:14de15825253
2097 raise error.RevlogError(msg) 2097 raise error.RevlogError(msg)
2098 2098
2099 sidedata = sidedatautil.deserialize_sidedata(segment) 2099 sidedata = sidedatautil.deserialize_sidedata(segment)
2100 return sidedata 2100 return sidedata
2101 2101
2102 def rawdata(self, nodeorrev, _df=None): 2102 def rawdata(self, nodeorrev):
2103 """return an uncompressed raw data of a given node or revision number. 2103 """return an uncompressed raw data of a given node or revision number."""
2104 2104 return self._revisiondata(nodeorrev, raw=True)
2105 _df - an existing file handle to read from. (internal-only)
2106 """
2107 return self._revisiondata(nodeorrev, _df, raw=True)
2108 2105
2109 def hash(self, text, p1, p2): 2106 def hash(self, text, p1, p2):
2110 """Compute a node hash. 2107 """Compute a node hash.
2111 2108
2112 Available as a function so that subclasses can replace the hash 2109 Available as a function so that subclasses can replace the hash