Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
44059:7126d8b8e0e6 | 44060:a61287a95dc3 |
---|---|
39 skiphash = False | 39 skiphash = False |
40 """ | 40 """ |
41 | 41 |
42 from __future__ import absolute_import | 42 from __future__ import absolute_import |
43 | 43 |
44 import hashlib | |
45 import inspect | 44 import inspect |
46 import os | 45 import os |
47 import re | 46 import re |
48 import socket | 47 import socket |
49 import stat | 48 import stat |
65 pycompat, | 64 pycompat, |
66 util, | 65 util, |
67 ) | 66 ) |
68 | 67 |
69 from .utils import ( | 68 from .utils import ( |
69 hashutil, | |
70 procutil, | 70 procutil, |
71 stringutil, | 71 stringutil, |
72 ) | 72 ) |
73 | 73 |
74 | 74 |
75 def _hashlist(items): | 75 def _hashlist(items): |
76 """return sha1 hexdigest for a list""" | 76 """return sha1 hexdigest for a list""" |
77 return node.hex(hashlib.sha1(stringutil.pprint(items)).digest()) | 77 return node.hex(hashutil.sha1(stringutil.pprint(items)).digest()) |
78 | 78 |
79 | 79 |
80 # sensitive config sections affecting confighash | 80 # sensitive config sections affecting confighash |
81 _configsections = [ | 81 _configsections = [ |
82 b'alias', # affects global state commands.table | 82 b'alias', # affects global state commands.table |