~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-21 03:19:11 UTC
  • mfrom: (3435.1.2 bug-220806)
  • Revision ID: pqm@pqm.ubuntu.com-20080521031911-acjem4ky3hjs8gjh
Define _remote_is_at_least_1_2 on SmartClientMedium base class,
        rather than just SmartClientStreamMedium. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
439
439
        self._protocol_version_error = None
440
440
        self._protocol_version = None
441
441
        self._done_hello = False
 
442
        # Be optimistic: we assume the remote end can accept new remote
 
443
        # requests until we get an error saying otherwise.  (1.2 adds some
 
444
        # requests that send bodies, which confuses older servers.)
 
445
        self._remote_is_at_least_1_2 = True
442
446
 
443
447
    def protocol_version(self):
444
448
        """Find out if 'hello' smart request works."""
505
509
    def __init__(self, base):
506
510
        SmartClientMedium.__init__(self, base)
507
511
        self._current_request = None
508
 
        # Be optimistic: we assume the remote end can accept new remote
509
 
        # requests until we get an error saying otherwise.  (1.2 adds some
510
 
        # requests that send bodies, which confuses older servers.)
511
 
        self._remote_is_at_least_1_2 = True
512
512
 
513
513
    def accept_bytes(self, bytes):
514
514
        self._accept_bytes(bytes)