comparison mercurial/revlog.py @ 42845:f75f47b3ea41

revlog: deprecate the use of `revision(..., raw=True)` We have an official `rawdata` function now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 02 Sep 2019 16:28:43 +0200
parents 2c4f656c8e9f
children 5bb68fb72df2
comparison
equal deleted inserted replaced
42842:2c74337e6483 42845:f75f47b3ea41
1608 _df - an existing file handle to read from. (internal-only) 1608 _df - an existing file handle to read from. (internal-only)
1609 raw - an optional argument specifying if the revision data is to be 1609 raw - an optional argument specifying if the revision data is to be
1610 treated as raw data when applying flag transforms. 'raw' should be set 1610 treated as raw data when applying flag transforms. 'raw' should be set
1611 to True when generating changegroups or in debug commands. 1611 to True when generating changegroups or in debug commands.
1612 """ 1612 """
1613 if raw:
1614 msg = ('revlog.revision(..., raw=True) is deprecated, '
1615 'use revlog.rawdata(...)')
1616 util.nouideprecwarn(msg, '5.2', stacklevel=2)
1613 return self._revisiondata(nodeorrev, _df, raw=raw) 1617 return self._revisiondata(nodeorrev, _df, raw=raw)
1614 1618
1615 def _revisiondata(self, nodeorrev, _df=None, raw=False): 1619 def _revisiondata(self, nodeorrev, _df=None, raw=False):
1616 # deal with <nodeorrev> argument type 1620 # deal with <nodeorrev> argument type
1617 if isinstance(nodeorrev, int): 1621 if isinstance(nodeorrev, int):