diff mercurial/chgserver.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 5e0f6451e2d2
children 04a3ae7aba14 5cd2d91eeebd
line wrap: on
line diff
--- a/mercurial/chgserver.py	Mon Jan 13 17:14:19 2020 -0500
+++ b/mercurial/chgserver.py	Mon Jan 13 17:15:14 2020 -0500
@@ -41,7 +41,6 @@
 
 from __future__ import absolute_import
 
-import hashlib
 import inspect
 import os
 import re
@@ -67,6 +66,7 @@
 )
 
 from .utils import (
+    hashutil,
     procutil,
     stringutil,
 )
@@ -74,7 +74,7 @@
 
 def _hashlist(items):
     """return sha1 hexdigest for a list"""
-    return node.hex(hashlib.sha1(stringutil.pprint(items)).digest())
+    return node.hex(hashutil.sha1(stringutil.pprint(items)).digest())
 
 
 # sensitive config sections affecting confighash