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

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 4:47 p.m.
Message ID <differential-rev-PHID-DREV-gpaoup5tdwdjwzotqxqf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42658/
State Superseded
Headers show

Comments

phabricator - Nov. 1, 2019, 4:47 p.m.
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




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

Patch

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):