~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Andrew Bennetts
  • Date: 2008-04-08 08:13:33 UTC
  • mto: This revision was merged to the branch mainline in revision 3355.
  • Revision ID: andrew.bennetts@canonical.com-20080408081333-lov0qqto26hyycoj
Add more tests, handle NoSuchRevision in case the remote branch's format can raise it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    """
133
133
    
134
134
    def do_with_locked_branch(self, branch, new_revno, new_last_revision_id):
135
 
        branch.set_last_revision_info(int(new_revno), new_last_revision_id)
 
135
        try:
 
136
            branch.set_last_revision_info(int(new_revno), new_last_revision_id)
 
137
        except errors.NoSuchRevision:
 
138
            return FailedSmartServerResponse(
 
139
                ('NoSuchRevision', new_last_revision_id))
136
140
        return SuccessfulSmartServerResponse(('ok',))
137
141
 
138
142