~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Martin Pool
  • Date: 2005-05-11 04:25:35 UTC
  • Revision ID: mbp@sourcefrog.net-20050511042535-286238ce7dcd6ebb
- remove compare_inventories() in favor of compare_trees()
- add basic tests for bzr log

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
    """
95
95
    from osutils import format_date
96
96
    from errors import BzrCheckError
97
 
    from diff import compare_inventories
 
97
    from diff import compare_trees
98
98
    from textui import show_status
99
 
    from inventory import Inventory
100
99
 
101
100
    if to_file == None:
102
101
        import sys
115
114
    branch._need_readlock()
116
115
    precursor = None
117
116
    if verbose:
118
 
        prev_inv = Inventory()
 
117
        from tree import EmptyTree
 
118
        prev_tree = EmptyTree()
119
119
    for revno, revision_id in which_revs():
120
120
        print >>to_file,  '-' * 60
121
121
        print >>to_file,  'revno:', revno
140
140
        # Don't show a list of changed files if we were asked about
141
141
        # one specific file.
142
142
 
143
 
        if verbose and not filename:
144
 
            this_inv = branch.get_inventory(rev.inventory_id)
145
 
            delta = compare_inventories(prev_inv, this_inv)
 
143
        if verbose:
 
144
            this_tree = branch.revision_tree(revision_id)
 
145
            delta = compare_trees(prev_tree, this_tree)
146
146
            delta.show(to_file, show_ids)
147
 
            prev_inv = this_inv
 
147
            prev_tree = this_tree
148
148
 
149
149
        precursor = revision_id
150
150