mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sun, 07 Jan 2024 01:05:10 +0100
changeset 51356 2a333d791ecf
parent 48966 6000f5b25c9b
permissions -rw-r--r--
delta-find: introduce a base class for _DeltaSearch This prepare the introduction of specialized the class in the next changesets.

import hashlib

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

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