mercurial/wireprototypes.py
changeset 48526 04688c51f81f
parent 45942 89a2afe31e82
child 48875 6000f5b25c9b
equal deleted inserted replaced
48525:d6c53b40b078 48526:04688c51f81f
    19 from .interfaces import util as interfaceutil
    19 from .interfaces import util as interfaceutil
    20 from .utils import compression
    20 from .utils import compression
    21 
    21 
    22 # Names of the SSH protocol implementations.
    22 # Names of the SSH protocol implementations.
    23 SSHV1 = b'ssh-v1'
    23 SSHV1 = b'ssh-v1'
    24 # These are advertised over the wire. Increment the counters at the end
       
    25 # to reflect BC breakages.
       
    26 SSHV2 = b'exp-ssh-v2-0003'
       
    27 HTTP_WIREPROTO_V2 = b'exp-http-v2-0003'
       
    28 
    24 
    29 NARROWCAP = b'exp-narrow-1'
    25 NARROWCAP = b'exp-narrow-1'
    30 ELLIPSESCAP1 = b'exp-ellipses-1'
    26 ELLIPSESCAP1 = b'exp-ellipses-1'
    31 ELLIPSESCAP = b'exp-ellipses-2'
    27 ELLIPSESCAP = b'exp-ellipses-2'
    32 SUPPORTED_ELLIPSESCAP = (ELLIPSESCAP1, ELLIPSESCAP)
    28 SUPPORTED_ELLIPSESCAP = (ELLIPSESCAP1, ELLIPSESCAP)
    35 TRANSPORTS = {
    31 TRANSPORTS = {
    36     SSHV1: {
    32     SSHV1: {
    37         b'transport': b'ssh',
    33         b'transport': b'ssh',
    38         b'version': 1,
    34         b'version': 1,
    39     },
    35     },
    40     SSHV2: {
       
    41         b'transport': b'ssh',
       
    42         # TODO mark as version 2 once all commands are implemented.
       
    43         b'version': 1,
       
    44     },
       
    45     b'http-v1': {
    36     b'http-v1': {
    46         b'transport': b'http',
    37         b'transport': b'http',
    47         b'version': 1,
    38         b'version': 1,
    48     },
       
    49     HTTP_WIREPROTO_V2: {
       
    50         b'transport': b'http',
       
    51         b'version': 2,
       
    52     },
    39     },
    53 }
    40 }
    54 
    41 
    55 
    42 
    56 class bytesresponse(object):
    43 class bytesresponse(object):