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
# http://www.selenic.com/mercurial/bts/issue433
hg init a
cd a
echo a > a
hg commit -Ama
hg parents -r 0 doesnotexist
true