diff mercurial/scmutil.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 0750cbffdb3b
children 089255b1341e
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Jan 13 17:14:19 2020 -0500
+++ b/mercurial/scmutil.py	Mon Jan 13 17:15:14 2020 -0500
@@ -9,7 +9,6 @@
 
 import errno
 import glob
-import hashlib
 import os
 import posixpath
 import re
@@ -48,6 +47,7 @@
 )
 
 from .utils import (
+    hashutil,
     procutil,
     stringutil,
 )
@@ -366,7 +366,7 @@
     key = None
     revs = sorted(r for r in cl.filteredrevs if r <= maxrev)
     if revs:
-        s = hashlib.sha1()
+        s = hashutil.sha1()
         for rev in revs:
             s.update(b'%d;' % rev)
         key = s.digest()