/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: Martin Pool
  • Date: 2005-09-05 09:27:11 UTC
  • Revision ID: mbp@sourcefrog.net-20050905092711-f9f5bded3fd82605
- more disentangling of xml storage format from objects

- remove pack_xml and unpack_xml function in favor of 
  serializer object

- test unpacking canned revision xml

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