mercurial/wireprotov1server.py
changeset 48526 04688c51f81f
parent 47012 d55b71393907
child 48597 8475a1364909
equal deleted inserted replaced
48525:d6c53b40b078 48526:04688c51f81f
   144     a repository that is supposed to be read-only.
   144     a repository that is supposed to be read-only.
   145     """
   145     """
   146     transports = {
   146     transports = {
   147         k for k, v in wireprototypes.TRANSPORTS.items() if v[b'version'] == 1
   147         k for k, v in wireprototypes.TRANSPORTS.items() if v[b'version'] == 1
   148     }
   148     }
   149 
       
   150     # Because SSHv2 is a mirror of SSHv1, we allow "batch" commands through to
       
   151     # SSHv2.
       
   152     # TODO undo this hack when SSH is using the unified frame protocol.
       
   153     if name == b'batch':
       
   154         transports.add(wireprototypes.SSHV2)
       
   155 
   149 
   156     if permission not in (b'push', b'pull'):
   150     if permission not in (b'push', b'pull'):
   157         raise error.ProgrammingError(
   151         raise error.ProgrammingError(
   158             b'invalid wire protocol permission; '
   152             b'invalid wire protocol permission; '
   159             b'got %s; expected "push" or "pull"' % permission
   153             b'got %s; expected "push" or "pull"' % permission