mercurial/posix.py
changeset 51830 454feddab720
parent 51795 1888846a1ee2
parent 51789 0f62ea8a9be8
child 51859 f4733654f144
equal deleted inserted replaced
51828:4eccb65e444f 51830:454feddab720
    21 import unicodedata
    21 import unicodedata
    22 
    22 
    23 from typing import (
    23 from typing import (
    24     Any,
    24     Any,
    25     AnyStr,
    25     AnyStr,
       
    26     Callable,
    26     Iterable,
    27     Iterable,
    27     Iterator,
    28     Iterator,
    28     List,
    29     List,
    29     Match,
    30     Match,
    30     NoReturn,
    31     NoReturn,
   550     # OpenVMS's symlink emulation is broken on some OpenVMS versions.
   551     # OpenVMS's symlink emulation is broken on some OpenVMS versions.
   551     def checklink(path: bytes) -> bool:
   552     def checklink(path: bytes) -> bool:
   552         return False
   553         return False
   553 
   554 
   554 
   555 
   555 _needsshellquote: Optional[Match[bytes]] = None
   556 _needsshellquote: Optional[Callable[[bytes], Optional[Match[bytes]]]] = None
   556 
   557 
   557 
   558 
   558 def shellquote(s: bytes) -> bytes:
   559 def shellquote(s: bytes) -> bytes:
   559     if pycompat.sysplatform == b'OpenVMS':
   560     if pycompat.sysplatform == b'OpenVMS':
   560         return b'"%s"' % s
   561         return b'"%s"' % s