hgmerge: add cleanup functions
This patch adds functions cleanup, success and failure.
The last two of these should be used instead of exit.
Current code was changed to use them.
It also moves $HGTMP to the top of the file (it's used in the cleanup
function), changes the comment and removes now unneeded trap
in the diff+patch merge.
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
changeset: 0:acb14030fe0a
tag: tip
user: test
date: Thu Jan 1 00:00:00 1970 +0000
summary: test
rolling back last transaction
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
A a