From patchwork Fri Oct 1 09:42:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11537: dirstate-item: use `maybe_clean` instead of `state` in record From: phabricator X-Patchwork-Id: 49861 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 1 Oct 2021 09:42:41 +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/D11537 AFFECTED FILES mercurial/cmdutil.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -626,7 +626,7 @@ for realname, tmpname in pycompat.iteritems(backups): ui.debug(b'restoring %r to %r\n' % (tmpname, realname)) - if dirstate[realname] == b'n': + if dirstate.get_entry(realname).maybe_clean: # without normallookup, restoring timestamp # may cause partially committed files # to be treated as unmodified