Here is, what --abort option is basically doing:
- hg resolve --unmark, then
- hg resolve --all --tool :local
- hg up <original ctx> --tool :local
step 1) is to mark all the files conflicted as unresolved (marking *all*
files to make sure that it also mark the files which might have been
resolved by user in meantime)
step 2) resolve all the conflicting files using --tool :local
step 3) update to the revision where it was checkedout before running the
hg update, using --tool :local
Use of --tool :local while updating to old revision (step3) make sure that
it will not hit merge conflict at the time of update. And since we are using
the same tool (:local) as we used at the time of resolution (step2) it makes
sure that we have exact changes in working directory as it was before IIUC.
Added tests demonstrate the behaviour of new flag.