Can't amend a commit that contains removed files.
Created originally on Bitbucket by cristi_diaconescu (Cristian Diaconescu)
- Create a changeset that removes a file from the repo and commit it.
- Oops, need to fix description.
- Amend the changeset (e.g. change the description message).
Result: Amend fails with "The system cannot find the file specified"
Here's the log:
#!cmd
% hg remove "D:\_src.NET_\CTUCsharpRuntime-hg\CTUFrameworkSyncTool/New Text Document.txt"
[command completed successfully Tue Apr 30 18:21:48 2013]
% hg commit --verbose --user cdiaconescu "--message=Test rem" -- "D:\_src.NET_\CTUCsharpRuntime-hg\CTUFrameworkSyncTool/New Text Document.txt"
committed changeset 375:246a3f057409
[command completed successfully Tue Apr 30 18:21:49 2013]
% hg commit --verbose --user cdiaconescu "--message=Test rem2" --amend -- "D:\_src.NET_\CTUCsharpRuntime-hg\CTUFrameworkSyncTool/New Text Document.txt"
amending changeset 246a3f057409
abort: CTUFrameworkSyncTool/New Text Document.txt: The system cannot find the file specified
[command returned code 255 Tue Apr 30 18:21:56 2013]
Workaround (using MQ):
- Create a changeset that removes a file from the repo and commit it.
- Oops, need to fix description.
- Amend the changeset. Doesn't work. Curse.
- Import changeset to MQ => patch
- Change the description of the patch
- QRefresh patch
- Finish patch.