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.
abort: <urlopen error (111, 'Connection refused')>
255
ls: copy: No such file or directory
changeset: 0:61c9426e69fe
tag: tip
user: test
date: Thu Jan 1 00:00:00 1970 +0000
summary: test
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
foo
pulling from old-http://localhost:20059/remote
searching for changes
no changes found