mercurial/utils/hashutil.py
author Raphaël Gomès <rgomes@octobus.net>
Wed, 04 Jan 2023 16:02:22 +0100
changeset 49845 e0c0545e2e55
parent 48875 6000f5b25c9b
child 51863 f4733654f144
permissions -rw-r--r--
branching: merge stable into default

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1