Mercurial > hg-stable
comparison mercurial/commands.py @ 14252:19067884c5f5
revlog: calculate base revisions iteratively
This is in preparation for generaldelta, where the revlog entry base field is
reinterpreted as the deltaparent. For that reason we also rename the base
function to chainbase.
Without generaldelta, performance is unaffected, but generaldelta will suffer
from this in _addrevision, since delta chains will be walked repeatedly.
A cache has been added to eliminate this problem completely.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Sat, 07 May 2011 22:40:14 +0200 |
parents | f1f4abdd5074 |
children | d6a762d93b77 |
comparison
equal
deleted
inserted
replaced
14251:258fbccf22f5 | 14252:19067884c5f5 |
---|---|
1562 try: | 1562 try: |
1563 pp = r.parents(node) | 1563 pp = r.parents(node) |
1564 except: | 1564 except: |
1565 pp = [nullid, nullid] | 1565 pp = [nullid, nullid] |
1566 ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % ( | 1566 ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % ( |
1567 i, r.start(i), r.length(i), r.base(i), r.linkrev(i), | 1567 i, r.start(i), r.length(i), r.chainbase(i), r.linkrev(i), |
1568 short(node), short(pp[0]), short(pp[1]))) | 1568 short(node), short(pp[0]), short(pp[1]))) |
1569 elif format == 1: | 1569 elif format == 1: |
1570 pr = r.parentrevs(i) | 1570 pr = r.parentrevs(i) |
1571 ui.write("% 6d %04x % 8d % 8d % 8d % 6d % 6d % 6d % 6d %s\n" % ( | 1571 ui.write("% 6d %04x % 8d % 8d % 8d % 6d % 6d % 6d % 6d %s\n" % ( |
1572 i, r.flags(i), r.start(i), r.length(i), r.rawsize(i), | 1572 i, r.flags(i), r.start(i), r.length(i), r.rawsize(i), |
1573 r.base(i), r.linkrev(i), pr[0], pr[1], short(node))) | 1573 r.chainbase(i), r.linkrev(i), pr[0], pr[1], short(node))) |
1574 | 1574 |
1575 def debugindexdot(ui, repo, file_): | 1575 def debugindexdot(ui, repo, file_): |
1576 """dump an index DAG as a graphviz dot file""" | 1576 """dump an index DAG as a graphviz dot file""" |
1577 r = None | 1577 r = None |
1578 if repo: | 1578 if repo: |