~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Robert Collins
  • Date: 2006-08-01 04:54:43 UTC
  • mfrom: (1864.6.1 plugin-imports)
  • mto: This revision was merged to the branch mainline in revision 1901.
  • Revision ID: robertc@robertcollins.net-20060801045443-b99468f4250e01c4
Merge Johns bug 51810 fixup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from bzrlib.inventory import InventoryEntry
18
18
from bzrlib.trace import mutter
19
 
from bzrlib.symbol_versioning import deprecated_function, zero_nine
 
19
from bzrlib.symbol_versioning import deprecated_function, zero_ten
20
20
 
21
21
 
22
22
class TreeDelta(object):
143
143
            show_list(self.unchanged)
144
144
 
145
145
 
146
 
@deprecated_function(zero_nine)
 
146
@deprecated_function(zero_ten)
147
147
def compare_trees(old_tree, new_tree, want_unchanged=False,
148
148
                  specific_files=None, extra_trees=None,
149
149
                  require_versioned=False):
162
162
    old_inv = old_tree.inventory
163
163
    new_inv = new_tree.inventory
164
164
    delta = TreeDelta()
165
 
    # mutter('start compare_trees')
 
165
    mutter('start compare_trees')
166
166
 
167
167
    # TODO: Rather than iterating over the whole tree and then filtering, we
168
168
    # could diff just the specified files (if any) and their subtrees.  
189
189
        """We have matched up 2 file_ids, check for changes."""
190
190
        assert old_entry.kind == new_entry.kind
191
191
 
 
192
        if old_entry.kind == 'root_directory':
 
193
            return
 
194
 
192
195
        if specific_file_ids:
193
196
            if (old_entry.file_id not in specific_file_ids and 
194
197
                new_entry.file_id not in specific_file_ids):