~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-11 04:37:48 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: aaron.bentley@utoronto.ca-20050811043748-9481c3082dae507d
Handled path generation properly

Show diffs side-by-side

added added

removed removed

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