mercurial/revset.py
changeset 31998 83527d9f1f13
parent 31938 5e3b49defbff
child 32085 2a2744dffecf
--- a/mercurial/revset.py	Sat Apr 15 11:26:09 2017 +0200
+++ b/mercurial/revset.py	Sat Apr 15 11:29:42 2017 +0200
@@ -32,6 +32,7 @@
 getsymbol = revsetlang.getsymbol
 getstring = revsetlang.getstring
 getinteger = revsetlang.getinteger
+getboolean = revsetlang.getboolean
 getlist = revsetlang.getlist
 getrange = revsetlang.getrange
 getargs = revsetlang.getargs
@@ -944,7 +945,11 @@
     fromline, toline = util.processlinerange(fromline, toline)
 
     fctx = repo[rev].filectx(fname)
-    if args.get('descend', False):
+    descend = False
+    if 'descend' in args:
+        descend = getboolean(args['descend'],
+                             _("'descend' argument must be a boolean"))
+    if descend:
         rs = generatorset(
             (c.rev() for c, _linerange
              in context.blockdescendants(fctx, fromline, toline)),