/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

  • Committer: Aaron Bentley
  • Date: 2007-11-21 13:21:38 UTC
  • mto: (3008.1.2 transform_preview)
  • mto: This revision was merged to the branch mainline in revision 3036.
  • Revision ID: aaron.bentley@utoronto.ca-20071121132138-trbirzab46iqw2np
Implement Differ object for abstracting diffing

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
        """
278
278
        raise NotImplementedError(self.get_symlink_target)
279
279
 
280
 
    def diff(self, text_diff, file_id, old_name, new_name, new_tree, to_file):
281
 
        try:
282
 
            old_entry = self.inventory[file_id]
283
 
        except errors.NoSuchId:
284
 
            old_entry = None
285
 
        if new_tree is None:
286
 
            new_entry = None
287
 
        else:
288
 
            new_entry = new_tree.inventory[file_id]
289
 
        if old_entry is None:
290
 
            new_entry.diff(text_diff, new_name, new_tree, old_name, old_entry,
291
 
                           self, to_file, reverse=True)
292
 
        else:
293
 
            old_entry.diff(text_diff, old_name, self, new_name, new_entry,
294
 
                           new_tree, to_file)
295
 
 
296
 
 
297
280
    def get_root_id(self):
298
281
        """Return the file_id for the root of this tree."""
299
282
        raise NotImplementedError(self.get_root_id)