~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

Crufty but existing _iter_changes implementation for WorkingTreeFormat4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
            )
89
89
 
90
90
    def _iter_changes(self, from_tree, include_unchanged=False,
91
 
                     specific_file_ids=None, pb=None):
 
91
                     specific_files=None, pb=None, extra_trees=None,
 
92
                     require_versioned=True):
92
93
        intertree = InterTree.get(from_tree, self)
93
 
        return intertree._iter_changes(include_unchanged,
94
 
                                       specific_file_ids, pb)
 
94
        return intertree._iter_changes(include_unchanged, specific_files, pb,
 
95
            extra_trees, require_versioned)
95
96
    
96
97
    def conflicts(self):
97
98
        """Get a list of the conflicts in the tree.
595
596
            # _compare_trees would think we want a complete delta
596
597
            return delta.TreeDelta()
597
598
        return delta._compare_trees(self.source, self.target, want_unchanged,
598
 
            specific_file_ids, include_root)
 
599
            specific_files, include_root, extra_trees=extra_trees)
599
600
 
600
601
    def _iter_changes(self, include_unchanged=False,
601
 
                      specific_file_ids=None, pb=None):
 
602
                      specific_files=None, pb=None, extra_trees=[],
 
603
                      require_versioned=True):
602
604
        """Generate an iterator of changes between trees.
603
605
 
604
606
        A tuple is returned:
614
616
 
615
617
        Iteration is done in parent-to-child order, relative to the target
616
618
        tree.
 
619
 
 
620
        There is no guarantee that all paths are in sorted order: the
 
621
        requirement to expand the search due to renames may result in children
 
622
        that should be found early being found late in the search, after
 
623
        lexically later results have been returned.
 
624
        :param require_versioned: Raise errors.PathsNotVersionedError if a
 
625
            path in the specific_files list is not versioned in one of
 
626
            source, target or extra_trees.
617
627
        """
 
628
        lookup_trees = [self.source]
 
629
        if extra_trees:
 
630
             lookup_trees.extend(extra_trees)
 
631
        specific_file_ids = self.target.paths2ids(specific_files,
 
632
            lookup_trees, require_versioned=require_versioned)
618
633
        to_paths = {}
619
634
        from_entries_by_dir = list(self.source.inventory.iter_entries_by_dir(
620
635
            specific_file_ids=specific_file_ids))