status: explicitly exclude removed file from unknown and ignored stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 01 Aug 2014 13:13:24 -0700
branchstable
changeset 21971 412ac613fd89
parent 21970 27205c8335b0
child 21972 8864528874f7
status: explicitly exclude removed file from unknown and ignored Changeset 64fe488b5179 introduced a test to validate that file were not reported twice when both unknown and removed. This behavior change was introduced by 65cdc6bab91e alongside a bug that dropped ignored and unknown completely (issue4321). As we are going to fix the bug, we need a proper implementation of the behavior tested in 64fe488b5179.
mercurial/context.py
--- a/mercurial/context.py	Fri Aug 01 11:45:26 2014 -0500
+++ b/mercurial/context.py	Fri Aug 01 13:13:24 2014 -0700
@@ -135,6 +135,10 @@
             elif fn not in deleted:
                 added.append(fn)
         removed = mf1.keys()
+        if removed:
+            # need to filter files if they are already reported as removed
+            unknown = [fn for fn in unknown if fn not in mf1]
+            ignored = [fn for fn in ignored if fn not in mf1]
 
         return [modified, added, removed, deleted, unknown, ignored, clean]