~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 14:15:25 UTC
  • mto: (6471.1.4 iter-child-entries)
  • mto: This revision was merged to the branch mainline in revision 6472.
  • Revision ID: jelmer@samba.org-20120220141525-9azkfei62st8yc7w
Use inventories directly in fewer places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
        annotations = annotator.annotate_flat(text_key)
243
243
        return [(key[-1], line) for key, line in annotations]
244
244
 
 
245
    def __eq__(self, other):
 
246
        if self is other:
 
247
            return True
 
248
        if isinstance(other, InventoryRevisionTree):
 
249
            return (self.root_inventory == other.root_inventory)
 
250
        return False
 
251
 
 
252
    def __ne__(self, other):
 
253
        return not (self == other)
 
254
 
 
255
    def __hash__(self):
 
256
        raise ValueError('not hashable')
 
257
 
245
258
 
246
259
class InterCHKRevisionTree(tree.InterTree):
247
260
    """Fast path optimiser for RevisionTrees with CHK inventories."""