/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 disappeared revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib import (
30
30
    debug,
31
31
    errors,
 
32
    trace,
32
33
    ui,
33
34
    )
34
35
 
222
223
        (type, type_data) = self._lookup_git_sha(sha)
223
224
        # convert object to git object
224
225
        if type == "commit":
225
 
            return self._get_commit(type_data[0], type_data[1], 
226
 
                                    expected_sha=sha)
 
226
            try:
 
227
                return self._get_commit(type_data[0], type_data[1], 
 
228
                                        expected_sha=sha)
 
229
            except errors.NoSuchRevision:
 
230
                trace.mutter('entry for %s %s in shamap: %r, but not found in repository', type, sha, type_data)
 
231
                raise KeyError(sha)
227
232
        elif type == "blob":
228
233
            return self._get_blob(type_data[0], type_data[1], expected_sha=sha)
229
234
        elif type == "tree":