view mercurial/utils/hashutil.py @ 45362:eb55274d3650

rhg: add buffered stdout writing possibility Improve batch stdout writing performance. At some point line buffered output should be introduced. Differential Revision: https://phab.mercurial-scm.org/D8866
author Antoine Cezar <antoine.cezar@octobus.net>
date Wed, 29 Jul 2020 10:26:17 +0200
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