mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 18 Aug 2021 12:49:55 +0200
branchstable
changeset 47837 1cb01c71ba32
parent 46413 521ac0d7047f
child 48966 6000f5b25c9b
permissions -rw-r--r--
pyoxidized: adapt output of test-flagprocessor.t The file path in the traceback become module name. Differential Revision: https://phab.mercurial-scm.org/D11294

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