mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 12 Jul 2022 01:13:56 +0200
changeset 49447 3c5d0f879404
parent 48966 6000f5b25c9b
child 51901 f4733654f144
permissions -rw-r--r--
perf-unbundle: add a perf command to time the unbundle operation Check documentation for details.

import hashlib

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

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