view mercurial/utils/hashutil.py @ 45408:543e446204c6

run-tests: extract logic to get errpath in a utility func Differential Revision: https://phab.mercurial-scm.org/D8979
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 02 Sep 2020 23:09:45 +0530
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