##// END OF EJS Templates
revsetlang: perform quoting using ui.escapestr instead of repr()...
Augie Fackler -
r31606:0b3eb280 default
parent child Browse files
Show More
@@ -15,6 +15,7 b' from . import ('
15 node,
15 node,
16 parser,
16 parser,
17 pycompat,
17 pycompat,
18 util,
18 )
19 )
19
20
20 elements = {
21 elements = {
@@ -581,11 +582,11 b' def _quote(s):'
581 >>> _quote("asdf'\"")
582 >>> _quote("asdf'\"")
582 '\'asdf\\\'"\''
583 '\'asdf\\\'"\''
583 >>> _quote('asdf\'')
584 >>> _quote('asdf\'')
584 '"asdf\'"'
585 "'asdf\\''"
585 >>> _quote(1)
586 >>> _quote(1)
586 "'1'"
587 "'1'"
587 """
588 """
588 return repr(str(s))
589 return "'%s'" % util.escapestr('%s' % s)
589
590
590 def formatspec(expr, *args):
591 def formatspec(expr, *args):
591 '''
592 '''
General Comments 0
You need to be logged in to leave comments. Login now