~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

and the tutorial patch came back, the very next day

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
 
136
136
    def get_file_sha1(self, file_id):
137
137
        ie = self._inventory[file_id]
138
 
        return ie.text_sha1
 
138
        if ie.kind == "file":
 
139
            return ie.text_sha1
139
140
 
140
141
    def has_filename(self, filename):
141
142
        return bool(self.inventory.path2id(filename))
157
158
        if False:  # just to make it a generator
158
159
            yield None
159
160
    
 
161
    def __contains__(self, file_id):
 
162
        return file_id in self._inventory
 
163
 
 
164
    def get_file_sha1(self, file_id):
 
165
        assert self._inventory[file_id].kind == "root_directory"
 
166
        return None
 
167
 
 
168
 
160
169
 
161
170
 
162
171
######################################################################