mercurial/error.py
branchstable
changeset 45503 bd5b2b29b82d
parent 45151 e429e7c801b2
child 45677 bdd2cdf9e248
--- a/mercurial/error.py	Fri Sep 11 14:41:05 2020 +0900
+++ b/mercurial/error.py	Sun Sep 13 15:59:23 2020 +0900
@@ -73,7 +73,10 @@
             from .node import short
 
             name = short(name)
-        RevlogError.__init__(self, b'%s@%s: %s' % (index, name, message))
+        # if name is a binary node, it can be None
+        RevlogError.__init__(
+            self, b'%s@%s: %s' % (index, pycompat.bytestr(name), message)
+        )
 
     def __bytes__(self):
         return RevlogError.__bytes__(self)