/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Aaron Bentley
  • Date: 2005-09-12 02:53:07 UTC
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050912025307-8c21544e8db1cbdb
added all_descendants and node_distances, exception when root doesn't exist

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
######################################################################