diff mercurial/templatefilters.py @ 46114: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 89a2afe31e82
children d4ba4d51f85f
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Sun Dec 13 18:29:22 2020 -0800
+++ b/mercurial/templatefilters.py	Tue Dec 01 21:54:46 2020 +0100
@@ -12,10 +12,10 @@
 import time
 
 from .i18n import _
+from .node import hex
 from . import (
     encoding,
     error,
-    node,
     pycompat,
     registrar,
     smartset,
@@ -280,7 +280,7 @@
     """Any text. Convert a binary Mercurial node identifier into
     its long hexadecimal representation.
     """
-    return node.hex(text)
+    return hex(text)
 
 
 @templatefilter(b'hgdate', intype=templateutil.date)