Patchwork D10976: dirstate: drop last explicite `state` usage in status

login
register
mail settings
Submitter phabricator
Date July 4, 2021, 9:55 p.m.
Message ID <differential-rev-PHID-DREV-rgkgvkggmwzkr4cqlz6q-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49290/
State Superseded
Headers show

Comments

phabricator - July 4, 2021, 9:55 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Given that the previous conditional we can safely use `tracked` here.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10976

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -1321,7 +1321,7 @@ 
                 aadd(fn)
             elif t.removed:
                 radd(fn)
-            elif state == b'n':
+            elif t.tracked:
                 if (
                     size >= 0
                     and (