# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-02-24 10:50:15 # Node ID 743b293c3ca01bfabf31abf4a75c4697ab67d837 # Parent fb7897e53d4916f758c822652cbfee78e8fdcb3c py3: use util.forcebytestr to convert error messages to bytes Differential Revision: https://phab.mercurial-scm.org/D2421 diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -255,7 +255,8 @@ class branchcache(dict): repo.filtername, len(self), nodecount) except (IOError, OSError, error.Abort) as inst: # Abort may be raised by read only opener, so log and continue - repo.ui.debug("couldn't write branch cache: %s\n" % inst) + repo.ui.debug("couldn't write branch cache: %s\n" % + util.forcebytestr(inst)) def update(self, repo, revgen): """Given a branchhead cache, self, that may have extra nodes or be diff --git a/mercurial/tags.py b/mercurial/tags.py --- a/mercurial/tags.py +++ b/mercurial/tags.py @@ -783,6 +783,6 @@ class hgtagsfnodescache(object): except (IOError, OSError) as inst: repo.ui.log('tagscache', "couldn't write cache/%s: %s\n" % ( - _fnodescachefile, inst)) + _fnodescachefile, util.forcebytestr(inst))) finally: lock.release()