transactions: avoid late tear-down (issue641)
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
#!/bin/sh
hg
hg -q
hg help
hg -q help
hg add -h
hg add --skjdfks
hg help diff
hg help status
hg -q help status
hg help foo
hg skjdfks
exit 0