mercurial/context.py
branchstable
changeset 16111 131d1a09108a
parent 15912 2bd54ffaa27e
child 16128 004982e5d782
child 16143 fceb2964fa6c
--- a/mercurial/context.py	Wed Feb 15 23:01:09 2012 +0900
+++ b/mercurial/context.py	Thu Feb 16 12:56:48 2012 +0100
@@ -906,11 +906,11 @@
         try:
             rejected = []
             for f in files:
-                if self._repo.dirstate[f] != 'a':
-                    self._repo.dirstate.remove(f)
-                elif f not in self._repo.dirstate:
+                if f not in self._repo.dirstate:
                     self._repo.ui.warn(_("%s not tracked!\n") % join(f))
                     rejected.append(f)
+                elif self._repo.dirstate[f] != 'a':
+                    self._repo.dirstate.remove(f)
                 else:
                     self._repo.dirstate.drop(f)
             return rejected