Mercurial > public > mercurial-scm > hg
diff contrib/dumprevlog @ 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 | c102b704edb5 |
children | 4c041c71ec01 |
line wrap: on
line diff
--- a/contrib/dumprevlog Sun Dec 13 18:29:22 2020 -0800 +++ b/contrib/dumprevlog Tue Dec 01 21:54:46 2020 +0100 @@ -5,9 +5,9 @@ from __future__ import absolute_import, print_function import sys +from mercurial.node import hex from mercurial import ( encoding, - node, pycompat, revlog, ) @@ -38,9 +38,9 @@ n = r.node(i) p = r.parents(n) d = r.revision(n) - printb(b"node: %s" % node.hex(n)) + printb(b"node: %s" % hex(n)) printb(b"linkrev: %d" % r.linkrev(i)) - printb(b"parents: %s %s" % (node.hex(p[0]), node.hex(p[1]))) + printb(b"parents: %s %s" % (hex(p[0]), hex(p[1]))) printb(b"length: %d" % len(d)) printb(b"-start-") printb(d)