# HG changeset patch # User Pierre-Yves David # Date 2021-09-29 15:42:57 # Node ID 571dd808c6c8c29f16b32ff035e4141c4f1b0011 # Parent e0d566f3ffce92ff66bae7c3ff2b7cf17f68e2b2 dirstate-item: use `maybe_clean` instead of `state` in record Differential Revision: https://phab.mercurial-scm.org/D11537 diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -626,7 +626,7 @@ def dorecord( 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