# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1523533916 -19800 # Node ID df4fd29c08546c61fc669192c5c312c62955ebc6 # Parent fd0e6678ba0ff6925b272fef2b97c98011e93cf1 py3: use stringutil.forcebytestr() to convert error messages to bytes Differential Revision: https://phab.mercurial-scm.org/D3284 diff -r fd0e6678ba0f -r df4fd29c0854 mercurial/subrepoutil.py --- a/mercurial/subrepoutil.py Thu Apr 12 08:06:39 2018 -0700 +++ b/mercurial/subrepoutil.py Thu Apr 12 17:21:56 2018 +0530 @@ -86,7 +86,8 @@ src = re.sub(pattern, repl, src, 1) except re.error as e: raise error.Abort(_("bad subrepository pattern in %s: %s") - % (p.source('subpaths', pattern), e)) + % (p.source('subpaths', pattern), + stringutil.forcebytestr(e))) return src state = {}