~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-22 13:39:51 UTC
  • mfrom: (6470.1.1 less-inventory-use-2)
  • Revision ID: pqm@pqm.ubuntu.com-20120222133951-cqvnnx710wox7905
(jelmer) Use inventories directly in fewer places. (Jelmer Vernooij)

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."""