Spotted when fixing the bug 5677. STR: $ hg init $TESTTMP/repo4 $ cd $TESTTMP/repo4 create a file to be removed $ echo a > a $ hg add a $ hg ci -m0 create a file to be missing $ echo b > b $ hg add b $ hg ci -m1 missing file should not be removed $ rm b $ hg amend nothing changed [1] removed file should be removed even if the file exists in working directory $ hg forget a BROKEN: missing file is removed, and removed file is not removed $ hg amend saved backup bundle to * (glob) $ hg status --change .
Bug was set to IN_PROGRESS for 14 days, moving back to confirmed
Fixed by https://mercurial-scm.org/repo/hg/rev/0ba3b928f9a9 Yuya Nishihara <yuya@tcha.org> amend: do not take untracked files as modified or clean (issue5732) fctx.exists() shouldn't be used here as it checks if a file physically exists, which may disagree with the dirstate. (please test the fix)
Fixed by https://mercurial-scm.org/repo/hg/rev/5f40efa472db Yuya Nishihara <yuya@tcha.org> amend: do not drop missing files (issue5732) samefile() can be wrong since wctx.manifest() does not include missing files, whereas missing files should be preserved on commit. (please test the fix)
Bug was set to TESTING for 7 days, resolving