fileset: add hgignore
authorMatt Mackall <mpm@selenic.com>
Sat, 18 Jun 2011 16:53:49 -0500
changeset 14680 49af5fa3809b
parent 14679 e141e1cee0cc
child 14681 0744db5eb51c
fileset: add hgignore
mercurial/fileset.py
--- a/mercurial/fileset.py	Sat Jun 18 16:53:49 2011 -0500
+++ b/mercurial/fileset.py	Sat Jun 18 16:53:49 2011 -0500
@@ -189,6 +189,11 @@
     ms = merge.mergestate(mctx.ctx._repo)
     return [f for f in mctx.subset if f in ms and ms[f] == 'u']
 
+def hgignore(mctx, x):
+    getargs(x, 0, 0, _("hgignore takes no arguments"))
+    ignore = mctx.ctx._repo.dirstate._ignore
+    return [f for f in mctx.subset if ignore(f)]
+
 symbols = {
     'added': added,
     'binary': binary,
@@ -196,6 +201,7 @@
     'deleted': deleted,
     'exec': exec_,
     'ignored': ignored,
+    'hgignore': hgignore,
     'modified': modified,
     'removed': removed,
     'resolved': resolved,