mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 08 Jul 2021 01:47:41 +0200
changeset 47652 12300ee6840b
parent 46785 521ac0d7047f
child 48875 6000f5b25c9b
permissions -rw-r--r--
largefile: use `parentchange` during rollback rollback is updating parent without touching the working copy. It should wrapped in a `parentchange` context. Differential Revision: https://phab.mercurial-scm.org/D11108

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