dirstate: reorder "state" checking conditional
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 04 Jul 2021 02:15:41 +0200
changeset 47533 174d0bcce2eb
parent 47532 ccbabaee5c36
child 47534 e53a42dce923
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
mercurial/dirstate.py
--- 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
         )