mercurial/utils/hashutil.py
author Manuel Jacob <me@manueljacob.de>
Sun, 29 May 2022 15:17:27 +0200
changeset 49284 d44e3c45f0e4
parent 48875 6000f5b25c9b
child 51863 f4733654f144
permissions -rw-r--r--
py3: replace `pycompat.xrange` by `range`

import hashlib

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

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