##// END OF EJS Templates
revset: fix %r handling in formatspec
Matt Mackall -
r15268:bd510381 default
parent child Browse files
Show More
@@ -1064,8 +1064,8 b' def formatspec(expr, *args):'
1064
1064
1065 Prefixing the type with 'l' specifies a parenthesized list of that type.
1065 Prefixing the type with 'l' specifies a parenthesized list of that type.
1066
1066
1067 >>> formatspec('%d:: and %lr', 10, ("this()", "that()"))
1067 >>> formatspec('%r:: and %lr', '10 or 11', ("this()", "that()"))
1068 '10:: and ((this()) or (that()))'
1068 '(10 or 11):: and ((this()) or (that()))'
1069 >>> formatspec('%d:: and not %d::', 10, 20)
1069 >>> formatspec('%d:: and not %d::', 10, 20)
1070 '10:: and not 20::'
1070 '10:: and not 20::'
1071 >>> formatspec('keyword(%s)', 'foo\\xe9')
1071 >>> formatspec('keyword(%s)', 'foo\\xe9')
@@ -1104,7 +1104,7 b' def formatspec(expr, *args):'
1104 d = expr[pos]
1104 d = expr[pos]
1105 if d == '%':
1105 if d == '%':
1106 ret += d
1106 ret += d
1107 elif d in 'dsnb':
1107 elif d in 'dsnbr':
1108 ret += argtype(d, args[arg])
1108 ret += argtype(d, args[arg])
1109 arg += 1
1109 arg += 1
1110 elif d == 'l':
1110 elif d == 'l':
General Comments 0
You need to be logged in to leave comments. Login now