revset: avoid implicit None testing in revset
Implicit None testing is a very good way to get in trouble. We explicitly test
for None.
--- a/mercurial/revset.py Sun Sep 20 16:53:42 2015 -0700
+++ b/mercurial/revset.py Wed Sep 23 00:41:07 2015 -0700
@@ -3225,10 +3225,13 @@
return lambda: self._iterfilter(it())
def __nonzero__(self):
- it = self
- fast = self.fastasc or self.fastdesc
- if fast:
+ fast = self.fastasc
+ if fast is None:
+ fast = self.fastdesc
+ if fast is not None:
it = fast()
+ else:
+ it = self
for r in it:
return True