~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-14 08:34:10 UTC
  • mto: This revision was merged to the branch mainline in revision 6501.
  • Revision ID: v.ladeuil+lp@free.fr-20120314083410-knnbugxnq7owem53
Remove deprecated code

Show diffs side-by-side

added added

removed removed

Lines of Context:
633
633
    inserted, other than through the Inventory API.
634
634
    """
635
635
 
636
 
    @deprecated_method(deprecated_in((2, 4, 0)))
637
 
    def __contains__(self, file_id):
638
 
        """True if this entry contains a file with given id.
639
 
 
640
 
        >>> inv = Inventory()
641
 
        >>> inv.add(InventoryFile('123', 'foo.c', ROOT_ID))
642
 
        InventoryFile('123', 'foo.c', parent_id='TREE_ROOT', sha1=None, len=None, revision=None)
643
 
        >>> inv.has_id('123')
644
 
        True
645
 
        >>> inv.has_id('456')
646
 
        False
647
 
 
648
 
        Note that this method along with __iter__ are not encouraged for use as
649
 
        they are less clear than specific query methods - they may be rmeoved
650
 
        in the future.
651
 
        """
652
 
        return self.has_id(file_id)
653
 
 
654
636
    def has_filename(self, filename):
655
637
        return bool(self.path2id(filename))
656
638