Show More
@@ -1621,6 +1621,7 b' class revlog(object):' | |||
|
1621 | 1621 | cachedrev = None |
|
1622 | 1622 | flags = None |
|
1623 | 1623 | rawtext = None |
|
1624 | basetext = None | |
|
1624 | 1625 | if node == nullid: |
|
1625 | 1626 | return "" |
|
1626 | 1627 | if self._revisioncache: |
@@ -1648,7 +1649,7 b' class revlog(object):' | |||
|
1648 | 1649 | |
|
1649 | 1650 | chain, stopped = self._deltachain(rev, stoprev=cachedrev) |
|
1650 | 1651 | if stopped: |
|
1651 |
|
|
|
1652 | basetext = self._revisioncache[2] | |
|
1652 | 1653 | |
|
1653 | 1654 | # drop cache to save memory |
|
1654 | 1655 | self._revisioncache = None |
@@ -1659,11 +1660,12 b' class revlog(object):' | |||
|
1659 | 1660 | targetsize = 4 * rawsize |
|
1660 | 1661 | |
|
1661 | 1662 | bins = self._chunks(chain, df=_df, targetsize=targetsize) |
|
1662 |
if |
|
|
1663 |
|
|
|
1663 | if basetext is None: | |
|
1664 | basetext = bytes(bins[0]) | |
|
1664 | 1665 | bins = bins[1:] |
|
1665 | 1666 | |
|
1666 |
rawtext = mdiff.patches( |
|
|
1667 | rawtext = mdiff.patches(basetext, bins) | |
|
1668 | del basetext # let us have a chance to free memory early | |
|
1667 | 1669 | self._revisioncache = (node, rev, rawtext) |
|
1668 | 1670 | |
|
1669 | 1671 | if flags is None: |
General Comments 0
You need to be logged in to leave comments.
Login now