changeset 31157:accdd5e62066

revert: move code dealing with deletions closer together
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 24 Feb 2016 14:44:14 -0800
parents e5aab82edf7f
children 58f55f0b40dc
files mercurial/cmdutil.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Mar 03 14:10:06 2017 -0500
+++ b/mercurial/cmdutil.py	Wed Feb 24 14:44:14 2016 -0800
@@ -2976,13 +2976,6 @@
         clean    = set(changes.clean)
         modadded = set()
 
-        # determine the exact nature of the deleted changesets
-        deladded = set(_deleted)
-        for path in _deleted:
-            if path in mf:
-                deladded.remove(path)
-        deleted = _deleted - deladded
-
         # We need to account for the state of the file in the dirstate,
         # even when we revert against something else than parent. This will
         # slightly alter the behavior of revert (doing back up or not, delete
@@ -3040,6 +3033,13 @@
                 dsremoved.add(src)
                 names[src] = (repo.pathto(src, cwd), True)
 
+        # determine the exact nature of the deleted changesets
+        deladded = set(_deleted)
+        for path in _deleted:
+            if path in mf:
+                deladded.remove(path)
+        deleted = _deleted - deladded
+
         # distinguish between file to forget and the other
         added = set()
         for abs in dsadded: