diff tests/test-revset.t @ 24204:d2de20e1451f

revset: extend fullreposet to make "null" revision magically appears in set As per fullreposet.__and__, it can omit the range check of rev. Therefore, "null" revision is accepted automagically. It seems this can fix many query results involving null symbol. Originally, the simplest "(null)" query did fail if there were hidden revisions. Tests are randomly chosen. fullreposet mimics the behavior of localrepo, where "null" revision is not listed but contained.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 08 Jan 2015 23:05:45 +0900
parents 2de9ee016425
children fe195d41f7d2
line wrap: on
line diff
--- a/tests/test-revset.t	Sat Jan 10 18:09:25 2015 +0900
+++ b/tests/test-revset.t	Thu Jan 08 23:05:45 2015 +0900
@@ -478,8 +478,33 @@
   [255]
 
 Test null revision
+  $ log '(null)'
+  -1
+  $ log '(null:0)'
+  -1
+  0
+  $ log '(0:null)'
+  0
+  -1
+  $ log 'null::0'
+  -1
+  0
+  $ log 'null:tip - 0:'
+  -1
+  $ log 'null: and null::' | head -1
+  -1
+  $ log 'null: or 0:' | head -2
+  -1
+  0
   $ log 'ancestors(null)'
   -1
+  $ log 'reverse(null:)' | tail -2
+  0
+  -1
+  $ log 'first(null:)'
+  -1
+  $ log 'min(null:)'
+  -1
   $ log 'tip:null and all()' | tail -2
   1
   0