From patchwork Fri Oct 1 09:42:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11533: dirstate-item: use `maybe_clean` instead of `state` in `strip` From: phabricator X-Patchwork-Id: 49855 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 1 Oct 2021 09:42:07 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11533 AFFECTED FILES mercurial/strip.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/strip.py b/mercurial/strip.py --- a/mercurial/strip.py +++ b/mercurial/strip.py @@ -255,7 +255,9 @@ # reset files that only changed in the dirstate too dirstate = repo.dirstate - dirchanges = [f for f in dirstate if dirstate[f] != b'n'] + dirchanges = [ + f for f in dirstate if not dirstate.get_entry(f).maybe_clean + ] changedfiles.extend(dirchanges) repo.dirstate.rebuild(urev, uctx.manifest(), changedfiles)