diff -r 80466fd85ac9 -r 131aae58a316 mercurial/fileset.py --- 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).