mercurial/patch.py
changeset 44060 a61287a95dc3
parent 43943 0671f0a19d93
child 44247 c443b9ba6f63
--- a/mercurial/patch.py	Mon Jan 13 17:14:19 2020 -0500
+++ b/mercurial/patch.py	Mon Jan 13 17:15:14 2020 -0500
@@ -12,7 +12,6 @@
 import contextlib
 import copy
 import errno
-import hashlib
 import os
 import re
 import shutil
@@ -41,6 +40,7 @@
 )
 from .utils import (
     dateutil,
+    hashutil,
     procutil,
     stringutil,
 )
@@ -2943,7 +2943,7 @@
         if not text:
             text = b""
         l = len(text)
-        s = hashlib.sha1(b'blob %d\0' % l)
+        s = hashutil.sha1(b'blob %d\0' % l)
         s.update(text)
         return hex(s.digest())