~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

Switch to PathsNotVersioned, accept extra_trees

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
            show_list(self.unchanged)
144
144
 
145
145
 
146
 
def compare_trees(old_tree, new_tree, want_unchanged=False, specific_files=None):
 
146
def compare_trees(old_tree, new_tree, want_unchanged=False, 
 
147
                  specific_files=None, require_versioned=False,
 
148
                  extra_trees=None):
147
149
    """Describe changes from one tree to another.
148
150
 
149
151
    Returns a TreeDelta with details of added, modified, renamed, and
168
170
    try:
169
171
        new_tree.lock_read()
170
172
        try:
 
173
            trees = (new_tree, old_tree)
 
174
            if extra_trees is not None:
 
175
                trees = trees + tuple(extra_trees)
171
176
            specific_file_ids = tree.specified_file_ids(specific_files, 
172
 
                (new_tree, old_tree), require_versioned=False)
 
177
                trees, require_versioned=require_versioned)
173
178
            return _compare_trees(old_tree, new_tree, want_unchanged,
174
179
                                  specific_file_ids)
175
180
        finally: