diff mercurial/localrepo.py @ 11230:5116a077c3da

make transactions work on non-refcounted python implementations
author Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
date Thu, 27 May 2010 17:47:40 +0200 (2010-05-27)
parents 5cdac5c35e68
children 3d0591a66118
line wrap: on
line diff
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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