diff -r 294a0aa51b8b -r b338d831d18c mercurial/context.py --- a/mercurial/context.py Thu Apr 15 19:54:03 2021 +0200 +++ b/mercurial/context.py Tue May 11 12:22:26 2021 -0700 @@ -1392,6 +1392,9 @@ def __bytes__(self): return bytes(self._parents[0]) + b"+" + def hex(self): + self._repo.nodeconstants.wdirhex + __str__ = encoding.strmethod(__bytes__) def __nonzero__(self):