diff tests/test-fileset.t @ 38686:131aae58a316

fileset: add "tracked()" to explicitly select files in the revision I'm going to rewrite filesets to be match predicates, which means basic patterns such as '*' will no longer be "closed" to the subset constructed from the ctx. Good thing is that 'hg status "set:not binary()"' can include unknown files out of the box, and fileset computation will likely to be faster as we won't have to walk dirstate twice, for example. Bad thing is that we can't select files at a certain revision by 'set:revs(REV, **)' since '**' is "open" to any paths. So, this patch introduces "tracked()" as a replacement for the '**' in the example above.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Jun 2018 22:19:56 +0900
parents 3d8ef60569d8
children ff5b6fca1082
line wrap: on
line diff
--- a/tests/test-fileset.t	Sat Jun 09 18:11:49 2018 +0900
+++ b/tests/test-fileset.t	Sun Jun 10 22:19:56 2018 +0900
@@ -524,7 +524,7 @@
 Test files at -r0 should be filtered by files at wdir
 -----------------------------------------------------
 
-  $ fileset -r0 '* and revs("wdir()", *)'
+  $ fileset -r0 'tracked() and revs("wdir()", tracked())'
   a1
   b1
   b2
@@ -590,12 +590,12 @@
   R a2
   $ fileset "status(0, 1, removed())"
   a2
-  $ fileset "* and status(0, 1, removed())"
+  $ fileset "tracked() and status(0, 1, removed())"
   $ fileset -r 4 "status(0, 1, removed())"
   a2
-  $ fileset -r 4 "* and status(0, 1, removed())"
-  $ fileset "revs('4', * and status(0, 1, removed()))"
-  $ fileset "revs('0', * and status(0, 1, removed()))"
+  $ fileset -r 4 "tracked() and status(0, 1, removed())"
+  $ fileset "revs('4', tracked() and status(0, 1, removed()))"
+  $ fileset "revs('0', tracked() and status(0, 1, removed()))"
   a2
 
 check wdir()