diff hgext/infinitepush/bundleparts.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 89a2afe31e82
children 6000f5b25c9b
line wrap: on
line diff
--- a/hgext/infinitepush/bundleparts.py	Sun Dec 13 18:29:22 2020 -0800
+++ b/hgext/infinitepush/bundleparts.py	Tue Dec 01 21:54:46 2020 +0100
@@ -6,13 +6,13 @@
 from __future__ import absolute_import
 
 from mercurial.i18n import _
+from mercurial.node import hex
 
 from mercurial import (
     bundle2,
     changegroup,
     error,
     extensions,
-    node as nodemod,
     pycompat,
     revsetlang,
     util,
@@ -54,7 +54,7 @@
         params[b'bookprevnode'] = b''
         bookmarks = repo._bookmarks
         if bookmark in bookmarks:
-            params[b'bookprevnode'] = nodemod.hex(bookmarks[bookmark])
+            params[b'bookprevnode'] = hex(bookmarks[bookmark])
 
     # Do not send pushback bundle2 part with bookmarks if remotenames extension
     # is enabled. It will be handled manually in `_push()`