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

Support converting git objects to bzr objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    )
35
35
from bzrlib.foreign import (
36
36
        ForeignRepository,
 
37
        ForeignRevision,
37
38
        )
38
39
from bzrlib.trace import mutter
39
40
from bzrlib.transport import get_transport
224
225
        self.mapping = mapping
225
226
        git_id = repository.lookup_git_revid(revision_id, self.mapping)
226
227
        try:
227
 
            commit = repository._git.commit(git_id)
228
 
        except KeyError, r:
 
228
            self.tree = repository._git.commit(git_id).tree
 
229
        except KeyError:
229
230
            raise errors.NoSuchRevision(repository, revision_id)
230
 
        self.tree = commit.tree
231
231
        self._inventory = inventory.Inventory(revision_id=revision_id)
232
232
        self._inventory.root.revision = revision_id
233
233
        self._build_inventory(self.tree, self._inventory.root, "")
249
249
                child_path = name
250
250
            else:
251
251
                child_path = urlutils.join(path, name)
252
 
            file_id = self.mapping.generate_file_id(child_path)
 
252
            file_id = mapping.generate_file_id(child_path
253
253
            entry_kind = (mode & 0700000) / 0100000
254
254
            if entry_kind == 0:
255
255
                child_ie = inventory.InventoryDirectory(file_id, basename, ie.file_id)