##// END OF EJS Templates
revsetlang: fix quoting of %ls string...
Yuya Nishihara -
r35613:91201737 default
parent child Browse files
Show More
@@ -585,7 +585,9 b' def formatspec(expr, *args):'
585 >>> formatspec(b'branch(%b)', b)
585 >>> formatspec(b'branch(%b)', b)
586 "branch('default')"
586 "branch('default')"
587 >>> formatspec(b'root(%ls)', [b'a', b'b', b'c', b'd'])
587 >>> formatspec(b'root(%ls)', [b'a', b'b', b'c', b'd'])
588 "root(_list('a\\x00b\\x00c\\x00d'))"
588 "root(_list('a\\\\x00b\\\\x00c\\\\x00d'))"
589 >>> formatspec('%ls', ['a', "'"])
590 "_list('a\\\\x00\\\\'')"
589 '''
591 '''
590
592
591 def argtype(c, arg):
593 def argtype(c, arg):
@@ -614,7 +616,7 b' def formatspec(expr, *args):'
614 elif t == 'd':
616 elif t == 'd':
615 return "_intlist('%s')" % "\0".join('%d' % int(a) for a in s)
617 return "_intlist('%s')" % "\0".join('%d' % int(a) for a in s)
616 elif t == 's':
618 elif t == 's':
617 return "_list('%s')" % "\0".join(s)
619 return "_list(%s)" % _quote("\0".join(s))
618 elif t == 'n':
620 elif t == 'n':
619 return "_hexlist('%s')" % "\0".join(node.hex(a) for a in s)
621 return "_hexlist('%s')" % "\0".join(node.hex(a) for a in s)
620 elif t == 'b':
622 elif t == 'b':
General Comments 0
You need to be logged in to leave comments. Login now