mercurial/debugcommands.py
changeset 46794 e2f7b2695ba1
parent 46770 b6ac612445e0
parent 46785 521ac0d7047f
child 46803 13d973690ecd
--- 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()