# HG changeset patch # User Pierre-Yves David # Date 2021-07-18 23:18:23 # Node ID 4d1ae9cba551b75fc5e0480cd8b79581579d1c67 # Parent 0e581d7e89b7d63bd93156950599434552cb9b81 amend: use `update_file` instead of `normallookup` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11170 diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2984,7 +2984,9 @@ def amend(ui, repo, old, extra, pats, op # would mark them as clean but with uncommitted contents. normalfiles = set(wctx.modified() + wctx.added()) & filestoamend for f in normalfiles: - dirstate.normallookup(f) + dirstate.update_file( + f, p1_tracked=True, wc_tracked=True, possibly_dirty=True + ) # Update the state of files which were removed in the amend # to "removed" in the dirstate.