~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Marius Kruger
  • Date: 2007-06-27 18:48:10 UTC
  • mfrom: (2557 +trunk)
  • mto: (2605.1.1 rm-renamed)
  • mto: This revision was merged to the branch mainline in revision 2609.
  • Revision ID: marius.kruger@enerweb.co.za-20070627184810-4jq1y5f20xafow9w
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        elif response == ('nobranch',):
111
111
            raise errors.NotBranchError(path=self.root_transport.base)
112
112
        else:
113
 
            assert False, 'unexpected response code %r' % (response,)
 
113
            raise errors.UnexpectedSmartServerResponse(response)
114
114
 
115
115
    def open_branch(self, _unsupported=False):
116
116
        assert _unsupported == False, 'unsupported flag support not implemented yet.'
367
367
        elif response[0] == 'UnlockableTransport':
368
368
            raise errors.UnlockableTransport(self.bzrdir.root_transport)
369
369
        else:
370
 
            assert False, 'unexpected response code %s' % (response,)
 
370
            raise errors.UnexpectedSmartServerResponse(response)
371
371
 
372
372
    def lock_write(self, token=None):
373
373
        if not self._lock_mode:
416
416
        elif response[0] == 'TokenMismatch':
417
417
            raise errors.TokenMismatch(token, '(remote token)')
418
418
        else:
419
 
            assert False, 'unexpected response code %s' % (response,)
 
419
            raise errors.UnexpectedSmartServerResponse(response)
420
420
 
421
421
    def unlock(self):
422
422
        self._lock_count -= 1
849
849
        elif response[0] == 'ReadOnlyError':
850
850
            raise errors.ReadOnlyError(self)
851
851
        else:
852
 
            assert False, 'unexpected response code %r' % (response,)
 
852
            raise errors.UnexpectedSmartServerResponse(response)
853
853
            
854
854
    def lock_write(self, token=None):
855
855
        if not self._lock_mode:
899
899
            raise errors.TokenMismatch(
900
900
                str((branch_token, repo_token)), '(remote tokens)')
901
901
        else:
902
 
            assert False, 'unexpected response code %s' % (response,)
 
902
            raise errors.UnexpectedSmartServerResponse(response)
903
903
 
904
904
    def unlock(self):
905
905
        self._lock_count -= 1