changeset 22187:aee5385e4bae

revert: process removed files missing in target as clean If a file does not exist in target and is marked as removed in the dirstate, we can mark it as clean. There are no changes needed to revert it.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 01 Aug 2014 18:27:47 -0700
parents a89bc7833e0d
children 0ad619c5e1a4
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Jul 31 15:52:56 2014 -0700
+++ b/mercurial/cmdutil.py	Fri Aug 01 18:27:47 2014 -0700
@@ -2429,8 +2429,8 @@
         dsmodified -= missingmodified
         missingadded = dsadded - smf
         dsadded -= missingadded
-        missingremoved = dsremoved - smf
-        dsremoved -= missingremoved
+        clean |= dsremoved - smf
+        dsremoved -= clean
 
         # action to be actually performed by revert
         # (<list of file>, message>) tuple
@@ -2449,7 +2449,6 @@
             (dsadded,          (actions['revert'],   True)),
             (missingadded,     (actions['remove'],   False)),
             (dsremoved,        (actions['undelete'], True)),
-            (missingremoved,   (None,                False)),
             (clean,            (None,                False)),
             )