Patchwork D2224: branchmap: wrap builtin exception in bytes for logging

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 4:13 p.m.
Message ID <differential-rev-PHID-DREV-envhllgncm4opnqc7hvn-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27820/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 4:13 p.m.
durin42 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/D2224

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -377,7 +377,7 @@ 
                 self._rbcrevs[:] = data
             except (IOError, OSError) as inst:
                 repo.ui.debug("couldn't read revision branch cache: %s\n" %
-                              inst)
+                              pycompat.bytestr(inst))
         # remember number of good records on disk
         self._rbcrevslen = min(len(self._rbcrevs) // _rbcrecsize,
                                len(repo.changelog))