Mercurial > public > mercurial-scm > hg-stable
diff mercurial/utils/storageutil.py @ 44060:a61287a95dc3
core: migrate uses of hashlib.sha1 to hashutil.sha1
Differential Revision: https://phab.mercurial-scm.org/D7849
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 13 Jan 2020 17:15:14 -0500 |
parents | 687b865b95ad |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/mercurial/utils/storageutil.py Mon Jan 13 17:14:19 2020 -0500 +++ b/mercurial/utils/storageutil.py Mon Jan 13 17:15:14 2020 -0500 @@ -7,7 +7,6 @@ from __future__ import absolute_import -import hashlib import re import struct @@ -24,8 +23,9 @@ pycompat, ) from ..interfaces import repository +from ..utils import hashutil -_nullhash = hashlib.sha1(nullid) +_nullhash = hashutil.sha1(nullid) def hashrevisionsha1(text, p1, p2): @@ -48,7 +48,7 @@ else: a = p2 b = p1 - s = hashlib.sha1(a) + s = hashutil.sha1(a) s.update(b) s.update(text) return s.digest()