Mercurial > hg
diff mercurial/patch.py @ 36229:6ea0b78ddcac
py3: use util.forcebytestr instead of str for converting errors to bytes
Differential Revision: https://phab.mercurial-scm.org/D2269
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 14 Feb 2018 17:43:33 +0530 |
parents | eb91ffdaaece |
children | 2831d918e1b4 |
line wrap: on
line diff
--- a/mercurial/patch.py Wed Feb 14 16:37:46 2018 +0530 +++ b/mercurial/patch.py Wed Feb 14 17:43:33 2018 +0530 @@ -1459,7 +1459,7 @@ dec.append(util.b85decode(line[1:])[:l]) except ValueError as e: raise PatchError(_('could not decode "%s" binary patch: %s') - % (self._fname, str(e))) + % (self._fname, util.forcebytestr(e))) line = getline(lr, self.hunk) text = zlib.decompress(''.join(dec)) if len(text) != size: