~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remotebranch.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-09-03 22:41:50 UTC
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: aaron.bentley@utoronto.ca-20050903224149-ceb3c2df52071fe4
Caused remotebranch to throw a NoSuchRevision when appropriate

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
ENABLE_URLGRABBER = True
40
40
 
41
 
from bzrlib.errors import BzrError
 
41
from bzrlib.errors import BzrError, NoSuchRevision
42
42
 
43
43
class GetFailed(BzrError):
44
44
    def __init__(self, url, status):
156
156
    def get_revision(self, revision_id):
157
157
        from bzrlib.revision import Revision
158
158
        from bzrlib.xml import unpack_xml
159
 
        revf = self.revision_store[revision_id]
 
159
        try:
 
160
            revf = self.revision_store[revision_id]
 
161
        except KeyError:
 
162
            raise NoSuchRevision(self, revision_id)
160
163
        r = unpack_xml(Revision, revf)
161
164
        if r.revision_id != revision_id:
162
165
            raise BzrCheckError('revision stored as {%s} actually contains {%s}'