view mercurial/utils/hashutil.py @ 50289:94a8c354242b stable

undo-files: make the undo-prefix configurable in `cleanup_undo_files` The transaction is configuration undo prefix, so we "need" it too.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 07 Mar 2023 03:31:21 +0100
parents 6000f5b25c9b
children
line wrap: on
line source

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1