diff mercurial/revsetlang.py @ 37087: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 1b179d151578
children 29eb4cafeeb8
line wrap: on
line diff
--- a/mercurial/revsetlang.py	Thu Mar 22 21:19:31 2018 +0900
+++ b/mercurial/revsetlang.py	Thu Mar 22 21:56:20 2018 +0900
@@ -17,6 +17,9 @@
     pycompat,
     util,
 )
+from .utils import (
+    stringutil,
+)
 
 elements = {
     # token-type: binding-strength, primary, prefix, infix, suffix
@@ -207,7 +210,7 @@
         raise error.ParseError(err)
 
 def getboolean(x, err):
-    value = util.parsebool(getsymbol(x))
+    value = stringutil.parsebool(getsymbol(x))
     if value is not None:
         return value
     raise error.ParseError(err)
@@ -565,7 +568,7 @@
     >>> _quote(1)
     "'1'"
     """
-    return "'%s'" % util.escapestr(pycompat.bytestr(s))
+    return "'%s'" % stringutil.escapestr(pycompat.bytestr(s))
 
 def _formatargtype(c, arg):
     if c == 'd':