mercurial/revsetlang.py
changeset 31997 11f501f0a213
parent 31800 c63cb2d10d6d
child 32291 bd872f64a8ba
--- a/mercurial/revsetlang.py	Tue Mar 28 10:15:02 2017 +0200
+++ b/mercurial/revsetlang.py	Sat Apr 15 11:26:09 2017 +0200
@@ -199,6 +199,12 @@
     except ValueError:
         raise error.ParseError(err)
 
+def getboolean(x, err):
+    value = util.parsebool(getsymbol(x))
+    if value is not None:
+        return value
+    raise error.ParseError(err)
+
 def getlist(x):
     if not x:
         return []