revset: remove nullrev from set computed in parents()
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 17 Sep 2014 19:49:26 -0700
changeset 22497 8ea3f47bcaff
parent 22496 35af9361a049
child 22498 64673dc48931
revset: remove nullrev from set computed in parents() 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 parents() so we filter out the invalid value.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Sep 17 19:44:03 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 19:49:26 2014 -0700
@@ -1237,6 +1237,7 @@
         cl = repo.changelog
         for r in getset(repo, spanset(repo), x):
             ps.update(cl.parentrevs(r))
+    ps -= set([node.nullrev])
     return baseset(ps) & subset
 
 def parentspec(repo, subset, x, n):