Commit 7126d8b8e0e by Augie Fackler

hashutil: new package for hashing-related features

Right now this just tries to use our sha1dc and if it's missing (eg a
--pure build) we fall back to hashlib. I imagine in the future we'll
want some other things in here for detecting what hasher is in use as
we transition off sha1.

Differential Revision: https://phab.mercurial-scm.org/D7848
parent bde1cd4c99d
from __future__ import absolute_import
import hashlib
try:
from ..thirdparty import sha1dc
sha1 = sha1dc.sha1
except (ImportError, AttributeError):
sha1 = hashlib.sha1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment