/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

Merge the change from Tree.compare to Tree.changes_from.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    trees or versioned trees.
52
52
    """
53
53
    
54
 
    def compare(self, other, want_unchanged=False, specific_files=None,
 
54
    def changes_from(self, other, want_unchanged=False, specific_files=None,
55
55
        extra_trees=None, require_versioned=False):
56
 
        """Return the changes from other to this tree.
 
56
        """Return a TreeDelta of the changes from other to this tree.
57
57
 
58
58
        :param other: A tree to compare with.
59
59
        :param specific_files: An optional list of file paths to restrict the
71
71
        The comparison will be performed by an InterTree object looked up on 
72
72
        self and other.
73
73
        """
74
 
        return InterTree.get(self, other).compare(
 
74
        # Martin observes that Tree.changes_from returns a TreeDelta and this
 
75
        # may confuse people, because the class name of the returned object is
 
76
        # a synonym of the object referenced in the method name.
 
77
        return InterTree.get(other, self).compare(
75
78
            want_unchanged=want_unchanged,
76
79
            specific_files=specific_files,
77
80
            extra_trees=extra_trees,