config: fix py3 backslash escaping bug in parser caught by tests
Differential Revision: https://phab.mercurial-scm.org/D3525
--- a/mercurial/config.py Fri Apr 27 13:27:18 2018 -0400
+++ b/mercurial/config.py Fri Apr 27 13:37:10 2018 -0400
@@ -215,7 +215,7 @@
parts.append('')
if s[offset:offset + 1] == '"' and not parts[-1]:
return _parse_quote, parts, offset + 1
- elif s[offset:offset + 1] == '"' and parts[-1][-1] == '\\':
+ elif s[offset:offset + 1] == '"' and parts[-1][-1:] == '\\':
parts[-1] = parts[-1][:-1] + s[offset:offset + 1]
return _parse_plain, parts, offset + 1
parts[-1] += s[offset:offset + 1]