There was an extra commit made during the amend operation to track the
changes to the working copy. However, this logic was written a long time back
and newer API's make this extra commit redundant. Therefore, I am removing the
extra commit. After this change, I noticed that
- Execution time of the cmdutil.amend improved by over 40%.
- Execution time of "hg commit --amend" improved by over 20%.
Looks like this loses the dirstateguard from cmdutil.commit() (and duplicates the message). Perhaps it will be easier to let the caller do the addremove() call and the locking (it already does the locking, so the locking above seems unnecessary). Anyway, this seems fine for now.