changeset 47533:174d0bcce2eb

dirstate: reorder "state" checking conditional This is easier to read and will make this simpler to update in the next changeset. Differential Revision: https://phab.mercurial-scm.org/D10975
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 04 Jul 2021 02:15:41 +0200
parents ccbabaee5c36
children e53a42dce923
files mercurial/dirstate.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Sun Jul 04 02:13:53 2021 +0200
+++ b/mercurial/dirstate.py	Sun Jul 04 02:15:41 2021 +0200
@@ -1315,6 +1315,12 @@
 
             if not st and t.tracked:
                 dadd(fn)
+            elif t.merged:
+                madd(fn)
+            elif t.added:
+                aadd(fn)
+            elif t.removed:
+                radd(fn)
             elif state == b'n':
                 if (
                     size >= 0
@@ -1344,12 +1350,6 @@
                     ladd(fn)
                 elif listclean:
                     cadd(fn)
-            elif t.merged:
-                madd(fn)
-            elif t.added:
-                aadd(fn)
-            elif t.removed:
-                radd(fn)
         status = scmutil.status(
             modified, added, removed, deleted, unknown, ignored, clean
         )