py3: use stringutil.forcebytestr() to convert error messages to bytes
Differential Revision: https://phab.mercurial-scm.org/D3284
--- 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 = {}