revset: make "null" able to appear in internal _list() expression
This is the same workaround introduced at
e16456831516. Without this patch,
"null or x" can't be optimized to _list(null x).
Test case will be added by the next patch.
--- a/mercurial/revset.py Sun May 24 14:49:41 2015 +0900
+++ b/mercurial/revset.py Fri May 29 21:31:00 2015 +0900
@@ -1928,7 +1928,8 @@
r = repo[t].rev()
if r in seen:
continue
- if r in subset:
+ if (r in subset
+ or r == node.nullrev and isinstance(subset, fullreposet)):
ls.append(r)
seen.add(r)
return baseset(ls)