diff mercurial/wireprotov1peer.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 9f70512ae2cf
children 89a2afe31e82
line wrap: on
line diff
--- a/mercurial/wireprotov1peer.py	Mon Jan 13 17:14:19 2020 -0500
+++ b/mercurial/wireprotov1peer.py	Mon Jan 13 17:15:14 2020 -0500
@@ -7,7 +7,6 @@
 
 from __future__ import absolute_import
 
-import hashlib
 import sys
 import weakref
 
@@ -31,6 +30,7 @@
     repository,
     util as interfaceutil,
 )
+from .utils import hashutil
 
 urlreq = util.urlreq
 
@@ -489,7 +489,7 @@
 
         if heads != [b'force'] and self.capable(b'unbundlehash'):
             heads = wireprototypes.encodelist(
-                [b'hashed', hashlib.sha1(b''.join(sorted(heads))).digest()]
+                [b'hashed', hashutil.sha1(b''.join(sorted(heads))).digest()]
             )
         else:
             heads = wireprototypes.encodelist(heads)