/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 inventory.py

Provide VersionedFiles.get_annotator.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
 
299
299
    def path2id(self, path):
300
300
        if path in self.index:
301
 
            return self.fileid_map.lookup_file_id(path)
302
 
        self._read_contents()
303
 
        return super(GitIndexInventory, self).path2id(path)
 
301
            file_id = self.fileid_map.lookup_file_id(path)
 
302
        else:
 
303
            self._read_contents()
 
304
            file_id = super(GitIndexInventory, self).path2id(path)
 
305
        if type(file_id) is not str:
 
306
            raise AssertionError
 
307
        return file_id
304
308
 
305
309
    def __getitem__(self, file_id):
306
310
        self._read_contents()