dirstate: minor status cleanups
authorMatt Mackall <mpm@selenic.com>
Mon, 12 May 2008 11:37:08 -0500
changeset 6591 eda3fd322a7f
parent 6590 9f80e062d71c
child 6592 f3d7c2e81be1
dirstate: minor status cleanups
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Mon May 12 11:37:08 2008 -0500
+++ b/mercurial/dirstate.py	Mon May 12 11:37:08 2008 -0500
@@ -589,15 +589,16 @@
 
         for src, fn, st in self.statwalk(files, match, unknown=list_unknown,
                                          ignored=list_ignored):
-            if fn in dmap:
-                state, mode, size, time, foo = dmap[fn]
-            else:
+            if fn not in dmap:
                 if (list_ignored or fn in files) and self._dirignore(fn):
                     if list_ignored:
                         iadd(fn)
                 elif list_unknown:
                     uadd(fn)
                 continue
+
+            state, mode, size, time, foo = dmap[fn]
+
             if src == 'm':
                 nonexistent = True
                 if not st:
@@ -610,8 +611,6 @@
                     # We need to re-check that it is a valid file
                     if st and self._supported(fn, st.st_mode):
                         nonexistent = False
-                # XXX: what to do with file no longer present in the fs
-                # who are not removed in the dirstate ?
                 if nonexistent and state in "nma":
                     dadd(fn)
                     continue