diff -r 1e701ffd9df4 -r 5116a077c3da mercurial/localrepo.py --- a/mercurial/localrepo.py Sat May 29 20:32:39 2010 +0200 +++ b/mercurial/localrepo.py Thu May 27 17:47:40 2010 +0200 @@ -971,7 +971,8 @@ self.branchtags() return n finally: - del tr + if tr: + tr.release() lock.release() def destroyed(self): @@ -2194,7 +2195,7 @@ tr.close() finally: - del tr + tr.release() if changesets > 0: # forcefully update the on-disk branch cache