view mercurial/utils/hashutil.py @ 49201:c29e79d11b01 stable

test-dirstate: actually test the append code path in dirstate v2 Apparently it's not sufficient to modify a file to force the dirstate write-out, so the append code path was untested. By removing a file instead of changing we're forcing append to happen.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Tue, 17 May 2022 14:59:25 +0100
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