~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:18:51 UTC
  • Revision ID: mbp@sourcefrog.net-20050511041851-a0a7480c958ef86c
- new testing command compare-trees
- change operation of TreeDelta object a bit
  to specify which renamed files also have modified text
- new TreeDelta.show() factored out
- new compare_trees similar to compare_inventories
  but handling WorkingTrees that don't have a SHA-1 
  in the inventory but can get it from cache
- new Inventory.get_file_kind

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        if verbose and not filename:
144
144
            this_inv = branch.get_inventory(rev.inventory_id)
145
145
            delta = compare_inventories(prev_inv, this_inv)
146
 
 
147
 
            if delta.removed:
148
 
                print >>to_file, 'removed files:'
149
 
                for path, fid in delta.removed:
150
 
                    if show_ids:
151
 
                        print >>to_file, '  %-30s %s' % (path, fid)
152
 
                    else:
153
 
                        print >>to_file, ' ', path
154
 
            if delta.added:
155
 
                print >>to_file, 'added files:'
156
 
                for path, fid in delta.added:
157
 
                    if show_ids:
158
 
                        print >>to_file, '  %-30s %s' % (path, fid)
159
 
                    else:
160
 
                        print >>to_file, '  ' + path
161
 
            if delta.renamed:
162
 
                print >>to_file, 'renamed files:'
163
 
                for oldpath, newpath, fid in delta.renamed:
164
 
                    if show_ids:
165
 
                        print >>to_file, '  %s => %s %s' % (oldpath, newpath, fid)
166
 
                    else:
167
 
                        print >>to_file, '  %s => %s' % (oldpath, newpath)
168
 
            if delta.modified:
169
 
                print >>to_file, 'modified files:'
170
 
                for path, fid in delta.modified:
171
 
                    if show_ids:
172
 
                        print >>to_file, '  %-30s %s' % (path, fid)
173
 
                    else:
174
 
                        print >>to_file, '  ' + path
175
 
 
 
146
            delta.show(to_file, show_ids)
176
147
            prev_inv = this_inv
177
148
 
178
149
        precursor = revision_id