# HG changeset patch # User Manuel Jacob # Date 1653959165 -7200 # Node ID 227124098e1410dd9830e805776d80b68ff45afe # Parent 4554e2e965e21002987519c73cf1a40ec2851109 py3: use `x.hex()` instead of `pycompat.sysstr(node.hex(x))` diff -r 4554e2e965e2 -r 227124098e14 hgext/git/gitutil.py --- a/hgext/git/gitutil.py Tue May 31 02:47:22 2022 +0200 +++ b/hgext/git/gitutil.py Tue May 31 03:06:05 2022 +0200 @@ -1,8 +1,6 @@ """utilities to assist in working with pygit2""" -from mercurial.node import bin, hex, sha1nodeconstants - -from mercurial import pycompat +from mercurial.node import bin, sha1nodeconstants pygit2_module = None @@ -38,7 +36,7 @@ pygit2 and sqlite both need nodes as strings, not bytes. """ assert len(n) == 20 - return pycompat.sysstr(hex(n)) + return n.hex() def fromgitnode(n): diff -r 4554e2e965e2 -r 227124098e14 mercurial/branchmap.py --- a/mercurial/branchmap.py Tue May 31 02:47:22 2022 +0200 +++ b/mercurial/branchmap.py Tue May 31 03:06:05 2022 +0200 @@ -159,7 +159,7 @@ def _unknownnode(node): """raises ValueError when branchcache found a node which does not exists""" - raise ValueError('node %s does not exist' % pycompat.sysstr(hex(node))) + raise ValueError('node %s does not exist' % node.hex()) def _branchcachedesc(repo): diff -r 4554e2e965e2 -r 227124098e14 mercurial/obsolete.py --- a/mercurial/obsolete.py Tue May 31 02:47:22 2022 +0200 +++ b/mercurial/obsolete.py Tue May 31 03:06:05 2022 +0200 @@ -647,9 +647,7 @@ if len(succ) != 20: raise ValueError(succ) if prec in succs: - raise ValueError( - 'in-marker cycle with %s' % pycompat.sysstr(hex(prec)) - ) + raise ValueError('in-marker cycle with %s' % prec.hex()) metadata = tuple(sorted(metadata.items())) for k, v in metadata: