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

Cope with the fact that the old format didn't export file ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
                base_sha1 = self._lookup_revision_sha1(rev.parent_ids[0])
371
371
                root_tree = self[self[base_sha1].tree]
372
372
            root_ie = tree.inventory.root
373
 
        if roundtrip:
 
373
        if roundtrip and self.mapping.BZR_FILE_IDS_FILE is not None:
374
374
            b = self._create_fileid_map_blob(tree.inventory)
375
375
            if b is not None:
376
376
                root_tree[self.mapping.BZR_FILE_IDS_FILE] = ((stat.S_IFREG | 0644), b.id)
451
451
                raise AssertionError("unknown entry kind '%s'" % entry.kind)
452
452
        tree = directory_to_tree(inv[fileid], get_ie_sha1, unusual_modes,
453
453
            self.mapping.BZR_DUMMY_FILE)
454
 
        if inv.root.file_id == fileid:
 
454
        if (inv.root.file_id == fileid and
 
455
            self.mapping.BZR_FILE_IDS_FILE is not None):
455
456
            b = self._create_fileid_map_blob(inv)
456
457
            # If this is the root tree, add the file ids
457
458
            tree[self.mapping.BZR_FILE_IDS_FILE] = ((stat.S_IFREG | 0644), b.id)