/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

Merge new dulwich; fetching objects from local repository works now; they aren't converted yet though.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    def get_mapping(self):
80
80
        return default_mapping
81
81
 
 
82
    def make_working_trees(self):
 
83
        return True
82
84
 
83
85
 
84
86
class LocalGitRepository(GitRepository):
169
171
 
170
172
    def get_revision(self, revision_id):
171
173
        git_commit_id = self.lookup_git_revid(revision_id, self.get_mapping())
172
 
        commit = self._git.commit(git_commit_id)
 
174
        try:
 
175
            commit = self._git.commit(git_commit_id)
 
176
        except KeyError:
 
177
            raise errors.NoSuchRevision(self, revision_id)
173
178
        # print "fetched revision:", git_commit_id
174
 
        if commit is None:
175
 
            raise errors.NoSuchRevision(self, revision_id)
176
179
        revision = self._parse_rev(commit, self.get_mapping())
177
180
        assert revision is not None
178
181
        return revision