view mercurial/utils/hashutil.py @ 49180:c577d394ed6b

branching: merge with stable
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 12 May 2022 07:36:37 -0700
parents 6000f5b25c9b
children f4733654f144
line wrap: on
line source

import hashlib

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

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