D7193: py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read

touilleMan (Leblond Emmanuel) phabricator at mercurial-scm.org
Fri Nov 1 16:47:22 UTC 2019


touilleMan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7193

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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):



To: touilleMan, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list