diff mercurial/merge.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 32d11a23c9cf
children bd22e90c54b3
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Jan 13 17:14:19 2020 -0500
+++ b/mercurial/merge.py	Mon Jan 13 17:15:14 2020 -0500
@@ -8,7 +8,6 @@
 from __future__ import absolute_import
 
 import errno
-import hashlib
 import shutil
 import stat
 import struct
@@ -39,6 +38,7 @@
     util,
     worker,
 )
+from .utils import hashutil
 
 _pack = struct.pack
 _unpack = struct.unpack
@@ -512,7 +512,7 @@
         """hash the path of a local file context for storage in the .hg/merge
         directory."""
 
-        return hex(hashlib.sha1(path).digest())
+        return hex(hashutil.sha1(path).digest())
 
     def add(self, fcl, fco, fca, fd):
         """add a new (potentially?) conflicting file the merge state