mercurial/fileset.py
changeset 38686 131aae58a316
parent 38685 80466fd85ac9
child 38687 1500cbe22d53
--- a/mercurial/fileset.py	Sat Jun 09 18:11:49 2018 +0900
+++ b/mercurial/fileset.py	Sun Jun 10 22:19:56 2018 +0900
@@ -284,6 +284,13 @@
     s = set(mctx.status().clean)
     return [f for f in mctx.subset if f in s]
 
+@predicate('tracked()')
+def tracked(mctx, x):
+    """File that is under Mercurial control."""
+    # i18n: "tracked" is a keyword
+    getargs(x, 0, 0, _("tracked takes no arguments"))
+    return [f for f in mctx.subset if f in mctx.ctx]
+
 @predicate('binary()', callexisting=True)
 def binary(mctx, x):
     """File that appears to be binary (contains NUL bytes).