py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read stable
authorEmmanuel Leblond <emmanuel.leblond@gmail.com>
Fri, 01 Nov 2019 17:35:36 +0100
branchstable
changeset 43365 899e55e2d375
parent 43364 dd64e229c46b
child 43366 ee3a55c8fd0f
py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read Differential Revision: https://phab.mercurial-scm.org/D7193
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Fri Nov 01 17:38:07 2019 +0100
+++ b/mercurial/scmutil.py	Fri Nov 01 17:35:36 2019 +0100
@@ -1854,7 +1854,7 @@
                 raise error.CorruptedState(e % self.firstlinekey)
             d.update(updatedict)
         except ValueError as e:
-            raise error.CorruptedState(str(e))
+            raise error.CorruptedState(stringutil.forcebytestr(e))
         return d
 
     def write(self, data, firstline=None):