del transaction before lock before wlock
This way rollbacks happen while the repo is still locked.
Deleting lock before wlock is not strictly necessary, but is
more consistent with the locking order.
#header#
<title>Mercurial Error</title>
</head>
<body>
<h2>Mercurial Error</h2>
<p>
An error occured while processing your request:
</p>
<p>
#error|escape#
</p>
#footer#