diff mercurial/dirstate.py @ 6033:a1ebd5cd7e55

dirstate.status: avoid putting ignored files in the unknown list If list_ignored was false, we would blindly add files not in the dirstate to the unknown list. This should finish fixing issue886.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 08 Feb 2008 18:07:55 -0200
parents b41f0d6a74fc
children cfb4a51da7d5
line wrap: on
line diff
--- a/mercurial/dirstate.py	Fri Feb 08 18:07:55 2008 -0200
+++ b/mercurial/dirstate.py	Fri Feb 08 18:07:55 2008 -0200
@@ -530,6 +530,7 @@
         lookup, modified, added, unknown, ignored = [], [], [], [], []
         removed, deleted, clean = [], [], []
 
+        files = files or []
         _join = self._join
         lstat = os.lstat
         cmap = self._copymap
@@ -547,8 +548,9 @@
             if fn in dmap:
                 type_, mode, size, time, foo = dmap[fn]
             else:
-                if list_ignored and self._ignore(fn):
-                    iadd(fn)
+                if (list_ignored or fn in files) and self._dirignore(fn):
+                    if list_ignored:
+                        iadd(fn)
                 else:
                     uadd(fn)
                 continue