mercurial/revset.py
changeset 24306 6ddc86eedc3b
parent 24219 282c0d8c1880
child 24366 e8ea31131705
--- a/mercurial/revset.py	Fri Mar 13 14:20:13 2015 -0400
+++ b/mercurial/revset.py	Fri Mar 13 17:00:06 2015 -0400
@@ -18,7 +18,10 @@
 
 def _revancestors(repo, revs, followfirst):
     """Like revlog.ancestors(), but supports followfirst."""
-    cut = followfirst and 1 or None
+    if followfirst:
+        cut = 1
+    else:
+        cut = None
     cl = repo.changelog
 
     def iterate():
@@ -49,7 +52,10 @@
 
 def _revdescendants(repo, revs, followfirst):
     """Like revlog.descendants() but supports followfirst."""
-    cut = followfirst and 1 or None
+    if followfirst:
+        cut = 1
+    else:
+        cut = None
 
     def iterate():
         cl = repo.changelog