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

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 5:29 p.m.
Message ID <523e50478cf3d22e368988b15d6ad441@localhost.localdomain>
Download mbox | patch
Permalink /patch/42667/
State Not Applicable
Headers show

Comments

phabricator - Nov. 1, 2019, 5:29 p.m.
Closed by commit rHG8a1d9e252ea4: py3: fix exception message encoding in scmutil.py&#039;s simplekeyvaluefile.read (authored by touilleMan).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7193?vs=17447&id=17454

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7193/new/

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: touilleMan, #hg-reviewers, indygreg
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):