mercurial/utils/hashutil.py
author Kyle Lippincott <spectral@google.com>
Thu, 02 Jan 2020 11:04:18 -0800
branchstable
changeset 44247 c443b9ba6f63
parent 44059 7126d8b8e0e6
child 46785 521ac0d7047f
permissions -rw-r--r--
py3: __repr__ needs to return str, not bytes Differential Revision: https://phab.mercurial-scm.org/D8089

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

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