D7848: hashutil: new package for hashing-related features

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon Jan 13 23:39:48 EST 2020


Closed by commit rHG0803f803ba03: hashutil: new package for hashing-related features (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7848?vs=19189&id=19199

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7848/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7848

AFFECTED FILES
  mercurial/utils/hashutil.py

CHANGE DETAILS

diff --git a/mercurial/utils/hashutil.py b/mercurial/utils/hashutil.py
new file mode 100644
--- /dev/null
+++ b/mercurial/utils/hashutil.py
@@ -0,0 +1,9 @@
+from __future__ import absolute_import
+
+import hashlib
+
+try:
+    from mercurial.thirdparty import sha1dc
+    sha1 = sha1dc.sha1
+except (ImportError, AttributeError):
+    sha1 = hashlib.sha1



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list