diff mercurial/debugcommands.py @ 46796:e2f7b2695ba1

merge with stable
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Mar 2021 18:24:59 -0400
parents b6ac612445e0 521ac0d7047f
children 13d973690ecd
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Tue Mar 02 00:05:22 2021 +0100
+++ b/mercurial/debugcommands.py	Thu Mar 18 18:24:59 2021 -0400
@@ -1702,7 +1702,7 @@
     )
 
     try:
-        from . import rustext
+        from . import rustext  # pytype: disable=import-error
 
         rustext.__doc__  # trigger lazy import
     except ImportError:
@@ -2121,7 +2121,9 @@
                 try:
                     manifest = m[store.lookup(n)]
                 except error.LookupError as e:
-                    raise error.Abort(e, hint=b"Check your manifest node id")
+                    raise error.Abort(
+                        bytes(e), hint=b"Check your manifest node id"
+                    )
                 manifest.read()  # stores revisision in cache too
             return
 
@@ -2456,7 +2458,7 @@
                 tr.close()
             except ValueError as exc:
                 raise error.Abort(
-                    _(b'bad obsmarker input: %s') % pycompat.bytestr(exc)
+                    _(b'bad obsmarker input: %s') % stringutil.forcebytestr(exc)
                 )
             finally:
                 tr.release()