view mercurial/utils/hashutil.py @ 51713:74f1bf147a6d

heptapod-ci: use new v2.1 image This is finally catching up to ~3 years of tech debt.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 12:12:22 +0200
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