Show More
@@ -284,6 +284,13 b' def clean(mctx, x):' | |||||
284 | s = set(mctx.status().clean) |
|
284 | s = set(mctx.status().clean) | |
285 | return [f for f in mctx.subset if f in s] |
|
285 | return [f for f in mctx.subset if f in s] | |
286 |
|
286 | |||
|
287 | @predicate('tracked()') | |||
|
288 | def tracked(mctx, x): | |||
|
289 | """File that is under Mercurial control.""" | |||
|
290 | # i18n: "tracked" is a keyword | |||
|
291 | getargs(x, 0, 0, _("tracked takes no arguments")) | |||
|
292 | return [f for f in mctx.subset if f in mctx.ctx] | |||
|
293 | ||||
287 | @predicate('binary()', callexisting=True) |
|
294 | @predicate('binary()', callexisting=True) | |
288 | def binary(mctx, x): |
|
295 | def binary(mctx, x): | |
289 | """File that appears to be binary (contains NUL bytes). |
|
296 | """File that appears to be binary (contains NUL bytes). |
@@ -524,7 +524,7 b' small reminder of the repository state' | |||||
524 | Test files at -r0 should be filtered by files at wdir |
|
524 | Test files at -r0 should be filtered by files at wdir | |
525 | ----------------------------------------------------- |
|
525 | ----------------------------------------------------- | |
526 |
|
526 | |||
527 |
$ fileset -r0 ' |
|
527 | $ fileset -r0 'tracked() and revs("wdir()", tracked())' | |
528 | a1 |
|
528 | a1 | |
529 | b1 |
|
529 | b1 | |
530 | b2 |
|
530 | b2 | |
@@ -590,12 +590,12 b' use rev to restrict matched file' | |||||
590 | R a2 |
|
590 | R a2 | |
591 | $ fileset "status(0, 1, removed())" |
|
591 | $ fileset "status(0, 1, removed())" | |
592 | a2 |
|
592 | a2 | |
593 |
$ fileset " |
|
593 | $ fileset "tracked() and status(0, 1, removed())" | |
594 | $ fileset -r 4 "status(0, 1, removed())" |
|
594 | $ fileset -r 4 "status(0, 1, removed())" | |
595 | a2 |
|
595 | a2 | |
596 |
$ fileset -r 4 " |
|
596 | $ fileset -r 4 "tracked() and status(0, 1, removed())" | |
597 |
$ fileset "revs('4', |
|
597 | $ fileset "revs('4', tracked() and status(0, 1, removed()))" | |
598 |
$ fileset "revs('0', |
|
598 | $ fileset "revs('0', tracked() and status(0, 1, removed()))" | |
599 | a2 |
|
599 | a2 | |
600 |
|
600 | |||
601 | check wdir() |
|
601 | check wdir() |
General Comments 0
You need to be logged in to leave comments.
Login now