diff mercurial/revset.py @ 15268:bd5103819c2e

revset: fix %r handling in formatspec
author Matt Mackall <mpm@selenic.com>
date Sat, 15 Oct 2011 12:52:43 -0500
parents 8bea39ca9acb
children cdf1daa3b83f
line wrap: on
line diff
--- a/mercurial/revset.py	Sat Oct 15 19:07:51 2011 +0200
+++ b/mercurial/revset.py	Sat Oct 15 12:52:43 2011 -0500
@@ -1064,8 +1064,8 @@
 
     Prefixing the type with 'l' specifies a parenthesized list of that type.
 
-    >>> formatspec('%d:: and %lr', 10, ("this()", "that()"))
-    '10:: and ((this()) or (that()))'
+    >>> formatspec('%r:: and %lr', '10 or 11', ("this()", "that()"))
+    '(10 or 11):: and ((this()) or (that()))'
     >>> formatspec('%d:: and not %d::', 10, 20)
     '10:: and not 20::'
     >>> formatspec('keyword(%s)', 'foo\\xe9')
@@ -1104,7 +1104,7 @@
             d = expr[pos]
             if d == '%':
                 ret += d
-            elif d in 'dsnb':
+            elif d in 'dsnbr':
                 ret += argtype(d, args[arg])
                 arg += 1
             elif d == 'l':