--- a/mercurial/commands.py Tue Mar 02 00:05:22 2021 +0100
+++ b/mercurial/commands.py Thu Mar 18 18:24:59 2021 -0400
@@ -1083,7 +1083,7 @@
if rev:
if not nodes:
raise error.Abort(_(b'empty revision set'))
- node = repo[nodes.last()].node()
+ node = repo[nodes[-1]].node()
with hbisect.restore_state(repo, state, node):
while changesets:
# update state
@@ -3452,7 +3452,8 @@
regexp = util.re.compile(pattern, reflags)
except re.error as inst:
ui.warn(
- _(b"grep: invalid match pattern: %s\n") % pycompat.bytestr(inst)
+ _(b"grep: invalid match pattern: %s\n")
+ % stringutil.forcebytestr(inst)
)
return 1
sep, eol = b':', b'\n'