mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Jul 2021 03:25:21 +0200
changeset 47699 034979d24c7b
parent 46785 521ac0d7047f
child 48875 6000f5b25c9b
permissions -rw-r--r--
largefile: rearrange conditionnal in `synclfdirstate` We can liquidate the special case early, so do we. Differential Revision: https://phab.mercurial-scm.org/D11141

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