mercurial/util.py
changeset 8309 4ff63d699256
parent 8302 d2ad8c066676
child 8312 b87a50b7125c
equal deleted inserted replaced
8308:1268b895f69b 8309:4ff63d699256
    29     # Subsequent calls will go directly to the imported function.
    29     # Subsequent calls will go directly to the imported function.
    30     try:
    30     try:
    31         from hashlib import sha1 as _sha1
    31         from hashlib import sha1 as _sha1
    32     except ImportError:
    32     except ImportError:
    33         from sha import sha as _sha1
    33         from sha import sha as _sha1
    34     global _fastsha1
    34     global _fastsha1, sha1
    35     _fastsha1 = _sha1
    35     _fastsha1 = sha1 = _sha1
    36     return _sha1(s)
    36     return _sha1(s)
    37 
    37 
    38 import subprocess
    38 import subprocess
    39 closefds = os.name == 'posix'
    39 closefds = os.name == 'posix'
    40 def popen2(cmd, mode='t', bufsize=-1):
    40 def popen2(cmd, mode='t', bufsize=-1):