prune: prune fix transaction pattern
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 29 Apr 2015 14:23:09 -0700
changeset 1295 1ac05eef72ca
parent 1294 d1c29db2e055
child 1297 51ec3610968c
prune: prune fix transaction pattern I forgot to amend.
hgext/evolve.py
--- a/hgext/evolve.py	Tue Apr 07 14:26:03 2015 -0700
+++ b/hgext/evolve.py	Wed Apr 29 14:23:09 2015 -0700
@@ -1797,7 +1797,7 @@
     if not revs:
         raise util.Abort(_('nothing to prune'))
 
-    wlock = lock = None
+    wlock = lock = tr = None
     try:
         wlock = repo.wlock()
         lock = repo.lock()
@@ -1895,9 +1895,7 @@
 
         tr.close()
     finally:
-        if tr:
-            tr.release()
-        lockmod.release(lock, wlock)
+        lockmod.release(tr, lock, wlock)
 
 @command('amend|refresh',
     [('A', 'addremove', None,