changeset 22495:668b26d32bf6

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
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 04:40:30 -0700
parents 14f6cebfcb8a
children 35af9361a049
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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):