revset: remove nullrev from set computed in p1() and p2()
The old code relied on the subset contents to get rid of invalid values. We would
like to be able to rely more on the computation in p1() and p2() so we filter out
the invalid value
--- a/mercurial/revset.py Tue Sep 16 23:42:41 2014 -0700
+++ b/mercurial/revset.py Wed Sep 17 04:40:30 2014 -0700
@@ -1204,6 +1204,7 @@
cl = repo.changelog
for r in getset(repo, spanset(repo), x):
ps.add(cl.parentrevs(r)[0])
+ ps -= set([node.nullrev])
return subset & ps
def p2(repo, subset, x):
@@ -1222,6 +1223,7 @@
cl = repo.changelog
for r in getset(repo, spanset(repo), x):
ps.add(cl.parentrevs(r)[1])
+ ps -= set([node.nullrev])
return subset & ps
def parents(repo, subset, x):