Mercurial > hg-stable
changeset 47728:4d1ae9cba551
amend: use `update_file` instead of `normallookup`
This is the newer, more semantic API.
Differential Revision: https://phab.mercurial-scm.org/D11170
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 19 Jul 2021 01:18:23 +0200 |
parents | 0e581d7e89b7 |
children | b66ae4468c9a |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Jul 19 05:45:22 2021 +0200 +++ b/mercurial/cmdutil.py Mon Jul 19 01:18:23 2021 +0200 @@ -2984,7 +2984,9 @@ # 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.