##// END OF EJS Templates
revlog: return sidedata map from `_revisiondata`...
marmoute -
r43251:35ab2c1a default
parent child Browse files
Show More
@@ -1614,7 +1614,7 b' class revlog(flagutil.flagprocessorsmixi'
1614 1614 msg = ('revlog.revision(..., raw=True) is deprecated, '
1615 1615 'use revlog.rawdata(...)')
1616 1616 util.nouideprecwarn(msg, '5.2', stacklevel=2)
1617 return self._revisiondata(nodeorrev, _df, raw=raw)
1617 return self._revisiondata(nodeorrev, _df, raw=raw)[0]
1618 1618
1619 1619 def sidedata(self, nodeorrev, _df=None):
1620 1620 """a map of extra data related to the changeset but not part of the hash
@@ -1637,7 +1637,7 b' class revlog(flagutil.flagprocessorsmixi'
1637 1637
1638 1638 # fast path the special `nullid` rev
1639 1639 if node == nullid:
1640 return ""
1640 return "", {}
1641 1641
1642 1642 # The text as stored inside the revlog. Might be the revision or might
1643 1643 # need to be processed to retrieve the revision.
@@ -1648,7 +1648,7 b' class revlog(flagutil.flagprocessorsmixi'
1648 1648 if raw and validated:
1649 1649 # if we don't want to process the raw text and that raw
1650 1650 # text is cached, we can exit early.
1651 return rawtext
1651 return rawtext, {}
1652 1652 if rev is None:
1653 1653 rev = self.rev(node)
1654 1654 # the revlog's flag for this revision
@@ -1657,8 +1657,9 b' class revlog(flagutil.flagprocessorsmixi'
1657 1657
1658 1658 if validated and flags == REVIDX_DEFAULT_FLAGS:
1659 1659 # no extra flags set, no flag processor runs, text = rawtext
1660 return rawtext
1661
1660 return rawtext, {}
1661
1662 sidedata = {}
1662 1663 if raw:
1663 1664 validatehash = self._processflagsraw(rawtext, flags)
1664 1665 text = rawtext
@@ -1669,7 +1670,7 b' class revlog(flagutil.flagprocessorsmixi'
1669 1670 if not validated:
1670 1671 self._revisioncache = (node, rev, rawtext)
1671 1672
1672 return text
1673 return text, sidedata
1673 1674
1674 1675 def _rawtext(self, node, rev, _df=None):
1675 1676 """return the possibly unvalidated rawtext for a revision
@@ -1719,7 +1720,7 b' class revlog(flagutil.flagprocessorsmixi'
1719 1720
1720 1721 _df - an existing file handle to read from. (internal-only)
1721 1722 """
1722 return self._revisiondata(nodeorrev, _df, raw=True)
1723 return self._revisiondata(nodeorrev, _df, raw=True)[0]
1723 1724
1724 1725 def hash(self, text, p1, p2):
1725 1726 """Compute a node hash.
General Comments 0
You need to be logged in to leave comments. Login now