changeset 25342:5dde117269b6

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.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 29 May 2015 21:31:00 +0900
parents 9d6cc87bd507
children 7fbef7932af9
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)