Mercurial > hg
comparison mercurial/chgserver.py @ 46113:59fa3890d40a
node: import symbols explicitly
There is no point in lazy importing mercurial.node, it is used all over
the place anyway. So consistently import the used symbols directly.
Fix one file using symbols indirectly via mercurial.revlog.
Differential Revision: https://phab.mercurial-scm.org/D9480
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 01 Dec 2020 21:54:46 +0100 |
parents | aab70f05d6ec |
children | dadca47e3d4d |
comparison
equal
deleted
inserted
replaced
46112:d6afa9c149c3 | 46113:59fa3890d40a |
---|---|
52 from .i18n import _ | 52 from .i18n import _ |
53 from .pycompat import ( | 53 from .pycompat import ( |
54 getattr, | 54 getattr, |
55 setattr, | 55 setattr, |
56 ) | 56 ) |
57 from .node import hex | |
57 | 58 |
58 from . import ( | 59 from . import ( |
59 commandserver, | 60 commandserver, |
60 encoding, | 61 encoding, |
61 error, | 62 error, |
62 extensions, | 63 extensions, |
63 node, | |
64 pycompat, | 64 pycompat, |
65 util, | 65 util, |
66 ) | 66 ) |
67 | 67 |
68 from .utils import ( | 68 from .utils import ( |
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(hashutil.sha1(stringutil.pprint(items)).digest()) | 77 return 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 |