view mercurial/utils/hashutil.py @ 46880:8bf21b3869cd

persistent-nodemap: disable it unconditionally for test-ssh-proto-unbundle.t This is not relevant for the test and this will avoid a lot of variations. Differential Revision: https://phab.mercurial-scm.org/D10335
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 09 Apr 2021 03:51:25 +0200
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