~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Robert Collins
  • Date: 2005-10-17 21:20:18 UTC
  • mfrom: (1461)
  • mto: This revision was merged to the branch mainline in revision 1462.
  • Revision ID: robertc@robertcollins.net-20051017212018-5e2a78c67f36a026
merge from integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    def has_id(self, file_id):
59
59
        return self.inventory.has_id(file_id)
60
60
 
 
61
    def has_or_had_id(self, file_id):
 
62
        if file_id == self.inventory.root.file_id:
 
63
            return True
 
64
        return self.inventory.has_id(file_id)
 
65
 
61
66
    __contains__ = has_id
62
67
 
63
68
    def __iter__(self):
157
162
            return ie.text_sha1
158
163
 
159
164
    def is_executable(self, file_id):
 
165
        ie = self._inventory[file_id]
 
166
        if ie.kind != "file":
 
167
            return None 
160
168
        return self._inventory[file_id].executable
161
169
 
162
170
    def has_filename(self, filename):
171
179
        ie = self._inventory[file_id]
172
180
        return ie.symlink_target;
173
181
 
 
182
    def kind(self, file_id):
 
183
        return self._inventory[file_id].kind
174
184
 
175
185
class EmptyTree(Tree):
176
186
    def __init__(self):