/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/inventory.py

  • Committer: Aaron Bentley
  • Date: 2007-11-22 02:47:35 UTC
  • mto: This revision was merged to the branch mainline in revision 3036.
  • Revision ID: aaron.bentley@utoronto.ca-20071122024735-4tsl5snv3zi4m3zg
Refactor diff to be more pluggable

Show diffs side-by-side

added added

removed removed

Lines of Context:
619
619
    def _diff(self, text_diff, from_label, tree, to_label, to_entry, to_tree,
620
620
             output_to, reverse=False):
621
621
        """See InventoryEntry._diff."""
622
 
        from bzrlib.diff import Differ
 
622
        from bzrlib.diff import TreeDiffer
623
623
        from_file_id = self.file_id
624
624
        if to_entry:
625
625
            to_file_id = to_entry.file_id
629
629
            to_file_id, from_file_id = from_file_id, to_file_id
630
630
            tree, to_tree = to_tree, tree
631
631
            from_label, to_label = to_label, from_label
632
 
        differ = Differ(tree, to_tree, output_to, text_diff)
 
632
        differ = TreeDiffer(tree, to_tree, output_to, text_diff)
633
633
        return differ.diff_text(from_file_id, to_file_id, from_label, to_label)
634
634
 
635
635
    def has_text(self):
728
728
    def _diff(self, text_diff, from_label, tree, to_label, to_entry, to_tree,
729
729
             output_to, reverse=False):
730
730
        """See InventoryEntry._diff."""
731
 
        from bzrlib.diff import Differ
 
731
        from bzrlib.diff import TreeDiffer
732
732
        old_target = self.symlink_target
733
733
        if to_entry is not None:
734
734
            new_target = to_entry.symlink_target
741
741
            old_tree = to_tree
742
742
            new_tree = tree
743
743
            new_target, old_target = old_target, new_target
744
 
        differ = Differ(old_tree, new_tree, output_to, text_diff)
 
744
        differ = TreeDiffer(old_tree, new_tree, output_to, text_diff)
745
745
        return differ.diff_symlink(old_target, new_target)
746
746
 
747
747
    def __init__(self, file_id, name, parent_id):