~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-09 14:47:11 UTC
  • mfrom: (5837.2.5 tree-is-container)
  • Revision ID: pqm@pqm.ubuntu.com-20110509144711-b87xrawe7hozixek
(jelmer) Deprecate Tree.__iter__. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
from bzrlib.decorators import needs_read_lock
41
41
from bzrlib.inter import InterObject
 
42
from bzrlib.symbol_versioning import (
 
43
    deprecated_in,
 
44
    deprecated_method,
 
45
    )
42
46
 
43
47
 
44
48
class Tree(object):
137
141
        """
138
142
        return False
139
143
 
140
 
    def __iter__(self):
141
 
        """Yield all file ids in this tree."""
142
 
        raise NotImplementedError(self.__iter__)
143
 
 
144
144
    def all_file_ids(self):
145
145
        """Iterate through all file ids, including ids for missing files."""
146
 
        return set(self.inventory)
 
146
        raise NotImplementedError(self.all_file_ids)
147
147
 
148
148
    def id2path(self, file_id):
149
149
        """Return the path for a file id.
757
757
    def has_or_had_id(self, file_id):
758
758
        return self.inventory.has_id(file_id)
759
759
 
 
760
    def all_file_ids(self):
 
761
        return set(self.inventory)
 
762
 
 
763
    @deprecated_method(deprecated_in((2, 4, 0)))
760
764
    def __iter__(self):
761
765
        return iter(self.inventory)
762
766