view mercurial/utils/hashutil.py @ 48743:a1538c05d855 stable

copyright: it's 2022 Differential Revision: https://phab.mercurial-scm.org/D12183
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 15 Feb 2022 15:52:44 +0100
parents 521ac0d7047f
children 6000f5b25c9b
line wrap: on
line source

from __future__ import absolute_import

import hashlib

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

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