--- a/mercurial/parser.py Thu Mar 22 21:19:31 2018 +0900
+++ b/mercurial/parser.py Thu Mar 22 21:56:20 2018 +0900
@@ -25,6 +25,9 @@
pycompat,
util,
)
+from .utils import (
+ stringutil,
+)
class parser(object):
def __init__(self, elements, methods=None):
@@ -190,14 +193,14 @@
def unescapestr(s):
try:
- return util.unescapestr(s)
+ return stringutil.unescapestr(s)
except ValueError as e:
# mangle Python's exception into our format
raise error.ParseError(pycompat.bytestr(e).lower())
def _brepr(obj):
if isinstance(obj, bytes):
- return b"'%s'" % util.escapestr(obj)
+ return b"'%s'" % stringutil.escapestr(obj)
return encoding.strtolocal(repr(obj))
def _prettyformat(tree, leafnodes, level, lines):