view mercurial/utils/hashutil.py @ 49752:611ccb631cbc

peer: add a `path` attribute to peer It will start being set in the coming changesets.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 03 Dec 2022 00:13:50 +0100
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