##// END OF EJS Templates
perf: add `storage` as possible source for perfrevlogwrite...
Boris Feld -
r40590:355ae096 default
parent child Browse files
Show More
@@ -1584,6 +1584,7 b' def perfrevlogwrite(ui, repo, file_=None'
1584 * `parent-2`: add from a delta to the second parent if it exists
1584 * `parent-2`: add from a delta to the second parent if it exists
1585 (use a delta from the first parent otherwise)
1585 (use a delta from the first parent otherwise)
1586 * `parent-smallest`: add from the smallest delta (either p1 or p2)
1586 * `parent-smallest`: add from the smallest delta (either p1 or p2)
1587 * `storage`: add from the existing precomputed deltas
1587 """
1588 """
1588 opts = _byteskwargs(opts)
1589 opts = _byteskwargs(opts)
1589
1590
@@ -1595,7 +1596,8 b' def perfrevlogwrite(ui, repo, file_=None'
1595 stoprev = rllen + stoprev
1596 stoprev = rllen + stoprev
1596
1597
1597 source = opts['source']
1598 source = opts['source']
1598 validsource = (b'full', b'parent-1', b'parent-2', b'parent-smallest')
1599 validsource = (b'full', b'parent-1', b'parent-2', b'parent-smallest',
1600 b'storage')
1599 if source not in validsource:
1601 if source not in validsource:
1600 raise error.Abort('invalid source type: %s' % source)
1602 raise error.Abort('invalid source type: %s' % source)
1601
1603
@@ -1719,6 +1721,9 b' def _getrevisionseed(orig, rev, tr, sour'
1719 diff = p2diff
1721 diff = p2diff
1720 baserev = orig.rev(parent)
1722 baserev = orig.rev(parent)
1721 cachedelta = (baserev, diff)
1723 cachedelta = (baserev, diff)
1724 elif source == b'storage':
1725 baserev = orig.deltaparent(rev)
1726 cachedelta = (baserev, orig.revdiff(orig.node(baserev), rev))
1722
1727
1723 return ((text, tr, linkrev, p1, p2),
1728 return ((text, tr, linkrev, p1, p2),
1724 {'node': node, 'flags': flags, 'cachedelta': cachedelta})
1729 {'node': node, 'flags': flags, 'cachedelta': cachedelta})
General Comments 0
You need to be logged in to leave comments. Login now