D10975: dirstate: reorder "state" checking conditional
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sun Jul 4 21:55:36 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This is easier to read and will make this simpler to update in the next
changeset.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10975
AFFECTED FILES
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -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
)
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list