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
parents 5cdac5c35e68
children 3d0591a66118
line wrap: on
line diff
--- 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