changeset 14680:49af5fa3809b

fileset: add hgignore
author Matt Mackall <mpm@selenic.com>
date Sat, 18 Jun 2011 16:53:49 -0500
parents e141e1cee0cc
children 0744db5eb51c
files mercurial/fileset.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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,