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

Implement sha cache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        self._idmap = GitShaMap(self.repository._transport)
39
39
 
40
40
    def _update_sha_map(self):
41
 
        all_revids = set(self._idmap.revids())
42
 
        present = self.repository.has_revisions(all_revids)
43
 
        missing = all_revids - present
 
41
        all_revids = set(self.repository.all_revision_ids())
 
42
        present_revids = set(self._idmap.revids())
 
43
        missing = all_revids - present_revids
44
44
        for revid in missing:
45
45
            self._update_sha_map_revision(revid)
46
46
 
48
48
        raise NotImplementedError(self._parent_lookup)
49
49
 
50
50
    def _update_sha_map_revision(self, revid):
51
 
        (foreign_revid, mapping) = self.repository.lookup_git_revid(revid)
52
51
        inv = self.repository.get_inventory(revid)
53
 
        objects = inventory_to_tree_and_blobs(self.repository, mapping, revid)
 
52
        objects = inventory_to_tree_and_blobs(self.repository, self.mapping, revid)
54
53
        for sha, o, path in objects:
55
54
            if path == "":
56
55
                tree_sha = sha