Mercurial > hg
comparison mercurial/subrepoutil.py @ 37585:df4fd29c0854
py3: use stringutil.forcebytestr() to convert error messages to bytes
Differential Revision: https://phab.mercurial-scm.org/D3284
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 12 Apr 2018 17:21:56 +0530 |
parents | f0b6fbea00cf |
children | b94fecf4cd8c |
comparison
equal
deleted
inserted
replaced
37584:fd0e6678ba0f | 37585:df4fd29c0854 |
---|---|
84 repl = re.sub(br'\\\\([0-9]+)', br'\\\1', repl) | 84 repl = re.sub(br'\\\\([0-9]+)', br'\\\1', repl) |
85 try: | 85 try: |
86 src = re.sub(pattern, repl, src, 1) | 86 src = re.sub(pattern, repl, src, 1) |
87 except re.error as e: | 87 except re.error as e: |
88 raise error.Abort(_("bad subrepository pattern in %s: %s") | 88 raise error.Abort(_("bad subrepository pattern in %s: %s") |
89 % (p.source('subpaths', pattern), e)) | 89 % (p.source('subpaths', pattern), |
90 stringutil.forcebytestr(e))) | |
90 return src | 91 return src |
91 | 92 |
92 state = {} | 93 state = {} |
93 for path, src in p[''].items(): | 94 for path, src in p[''].items(): |
94 kind = 'hg' | 95 kind = 'hg' |