[PATCH 5/7] hgeditor: Remove temporary files even if interrupted

Radoslaw AstralStorm Szkodzinski astralstorm at gorzow.mm.pl
Fri Jul 8 07:17:44 CDT 2005


# HG changeset patch
# User Radoslaw "AstralStorm" Szkodzinski <astralstorm at gorzow.mm.pl>
# Node ID 1292f1fd015767d9682ba2ff5f8377fb6760c3a5
# Parent  a4c688c8273e392b1bf33cfc736e00ec752a415e
hgeditor: Remove temporary files even if interrupted

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hgeditor: Remove temporary files even if interrupted


Changeset summary:
 hgeditor |    2 	2 +	0 -
 1 files changed, 2 insertions(+)

manifest hash 84654c8bfa564416008966c9b544629a06656d56

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux)

iD8DBQFCzmz3lUMEU9HxC6IRAmmlAKCqRTdsXn5AtlZHHmzD8g657XECPACfYUNe
JI3sAEzg7TTutqIWevM20Xc=
=geOT
-----END PGP SIGNATURE-----

diff -r a4c688c8273e -r 1292f1fd0157 hgeditor
--- a/hgeditor	Fri Jul  8 12:08:44 2005
+++ b/hgeditor	Fri Jul  8 12:09:27 2005
@@ -24,6 +24,8 @@
     # we don't sign merges
     exec $EDITOR "$1"
 else
+    # Remove temporary files even if we get interrupted
+    trap "cleanup_exit 255" TERM KILL INT QUIT ABRT
     T1=`mktemp`; T2=`mktemp`
 
     # Add manifest hash in order to sign whole repository state.


More information about the Mercurial mailing list