view mercurial/utils/hashutil.py @ 46745:63bfcddddac1

rhg: Exit with an error code if `files` finds nothing This matches the behavior of Python-based hg. Differential Revision: https://phab.mercurial-scm.org/D10143
author Simon Sapin <simon.sapin@octobus.net>
date Mon, 08 Mar 2021 19:25:33 +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