--- a/mercurial/rewriteutil.py Sun Dec 13 18:29:22 2020 -0800
+++ b/mercurial/rewriteutil.py Tue Dec 01 21:54:46 2020 +0100
@@ -10,10 +10,13 @@
import re
from .i18n import _
+from .node import (
+ hex,
+ nullrev,
+)
from . import (
error,
- node,
obsolete,
obsutil,
revset,
@@ -30,7 +33,7 @@
Make sure this function is called after taking the lock.
"""
- if node.nullrev in revs:
+ if nullrev in revs:
msg = _(b"cannot %s null changeset") % action
hint = _(b"no changeset checked out")
raise error.InputError(msg, hint=hint)
@@ -113,7 +116,7 @@
if len(successors) == 1 and len(successors[0]) == 1:
successor = successors[0][0]
if successor is not None:
- newhash = node.hex(successor)
+ newhash = hex(successor)
commitmsg = commitmsg.replace(h, newhash[: len(h)])
else:
repo.ui.note(