mercurial/utils/hashutil.py
author Augie Fackler <raf@durin42.com>
Mon, 07 Sep 2020 17:13:45 -0400
changeset 45421 0c6b2cc9a7bb
parent 44059 7126d8b8e0e6
child 46785 521ac0d7047f
permissions -rw-r--r--
git: make dirstate status() respect matcher As with other changes in this stack, we appear to have been getting lucky in the past. An upcoming change behaved _very_ oddly without this fix. Differential Revision: https://phab.mercurial-scm.org/D8997

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

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