Amend fails on a commit with rename (or delete)
Created originally on Bitbucket by kankri
Input
- hg init
- echo a > a
- hg commit -A -m "a"
- hg mv a b
- hg commit -m "a -> b"
- echo c > c
- hg add c
- thg commit
- Change
Commit
button toAmend
- Select file
c
(in addition to preselecteda
andb
) - Press
Amend
Result
% hg commit --repository C:\Users\kankri\wrk\hg_amend_test --verbose --user someone@example.com --message=a -> b --amend -- b c a
amending changeset e0191deaba30
abort: a: The system cannot find the file specified
If a
is manually deselected, amend succeeds, but this feels counter-intuitive.
The GUI could show an unselectable check mark for the committed removal of a
and filter out any non-changed files in the actual hg commit --amend
command.
But I'm thinking that maybe it's the wrong approach to try to show what the commit will contain after amending instead of showing what is being amended. That is, show the same information for Amend
as what is shown for Commit
.