view mercurial/utils/hashutil.py @ 44303:d42eea9a0494

rust-filepatterns: improve API and robustness for pattern files parsing Within the next few patches we will be using this new API. Differential Revision: https://phab.mercurial-scm.org/D7908
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 16 Jan 2020 10:28:40 +0100
parents 7126d8b8e0e6
children 521ac0d7047f
line wrap: on
line source

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

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