/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

Add a new method ``Tree.revision_tree`` which allows access to cached
trees for arbitrary revisions. This allows the in development dirstate
tree format to provide access to the callers to cached copies of 
inventory data which are cheaper to access than inventories from the
repository. (Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""Display what revisions are missing in 'other' from 'this' and vice verca."""
 
1
"""Display what revisions are missing in 'other' from 'this' and vice versa."""
2
2
 
3
3
import bzrlib.ui as ui
4
4
 
5
5
 
6
6
def iter_log_data(revisions, revision_source, verbose):
7
 
    from bzrlib.diff import compare_trees
8
 
    from bzrlib.tree import EmptyTree
9
 
    last_tree = EmptyTree
 
7
    last_tree = revision_source.revision_tree(None)
10
8
    last_rev_id = None
11
9
    for revno, rev_id in revisions:
12
10
        rev = revision_source.get_revision(rev_id)
20
18
            revision_tree = revision_source.revision_tree(rev_id)
21
19
            last_rev_id = rev_id
22
20
            last_tree = revision_tree
23
 
            delta = compare_trees(revision_tree, parent_tree)
 
21
            delta = parent_tree.changes_from(revision_tree)
24
22
        else:
25
23
            delta = None
26
24
        yield revno, rev, delta