fileset: matchctx.existing() must consider ignored files
When running:
$ hg debugfileset 'binary() and ignored()'
getfileset() was correctly retrieving ignored files but
matchctx.existing() was not taking them in account. Just add them along
with unknown files.
--- a/mercurial/fileset.py Wed Aug 15 22:29:09 2012 +0200
+++ b/mercurial/fileset.py Wed Aug 15 22:29:32 2012 +0200
@@ -432,7 +432,7 @@
def existing(self):
if self._status is not None:
removed = set(self._status[3])
- unknown = set(self._status[4])
+ unknown = set(self._status[4] + self._status[5])
else:
removed = set()
unknown = set()
--- a/tests/test-fileset.t Wed Aug 15 22:29:09 2012 +0200
+++ b/tests/test-fileset.t Wed Aug 15 22:29:32 2012 +0200
@@ -82,6 +82,9 @@
$ fileset 'binary()'
$ fileset 'binary() and unknown()'
bin
+ $ echo '^bin$' >> .hgignore
+ $ fileset 'binary() and ignored()'
+ bin
$ hg add bin
$ fileset 'binary()'
bin