# HG changeset patch # User Pierre-Yves David # Date 1625357741 -7200 # Node ID 174d0bcce2ebd218ac3e8c5e3a4300acd61f4781 # Parent ccbabaee5c3689c825978d85efdb078f6471e0f6 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 diff -r ccbabaee5c36 -r 174d0bcce2eb 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 )