mercurial/parser.py
changeset 37084 f0b6fbea00cf
parent 36547 7840d8bd0558
child 39050 0a2ce5b43574
--- 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):