Mercurial > hg
diff mercurial/changelog.py @ 37084:f0b6fbea00cf
stringutil: bulk-replace call sites to point to new module
This might conflict with other patches floating around, sorry.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Mar 2018 21:56:20 +0900 |
parents | c6061cadb400 |
children | e7aa113b14f7 |
line wrap: on
line diff
--- a/mercurial/changelog.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/changelog.py Thu Mar 22 21:56:20 2018 +0900 @@ -24,7 +24,10 @@ revlog, util, ) -from .utils import dateutil +from .utils import ( + dateutil, + stringutil, +) _defaultextra = {'branch': 'default'} @@ -36,7 +39,7 @@ >>> s 'ab\\ncd\\\\\\\\n\\x00ab\\rcd\\\\\\n' >>> res = _string_escape(s) - >>> s == util.unescapestr(res) + >>> s == stringutil.unescapestr(res) True """ # subset of the string_escape codec @@ -62,7 +65,7 @@ l = l.replace('\\\\', '\\\\\n') l = l.replace('\\0', '\0') l = l.replace('\n', '') - k, v = util.unescapestr(l).split(':', 1) + k, v = stringutil.unescapestr(l).split(':', 1) extra[k] = v return extra