D3525: config: fix py3 backslash escaping bug in parser caught by tests
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu May 10 15:15:19 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3525
AFFECTED FILES
mercurial/config.py
CHANGE DETAILS
diff --git a/mercurial/config.py b/mercurial/config.py
--- a/mercurial/config.py
+++ b/mercurial/config.py
@@ -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]
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list