changeset 17367:ce625185cfd9 stable

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.
author Patrick Mezard <patrick@mezard.eu>
date Wed, 15 Aug 2012 22:29:32 +0200
parents 04c65cb59467
children 01cc267fc105
files mercurial/fileset.py tests/test-fileset.t
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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