debugrecordpruneparents: release tr the same way than the lock
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 06 Aug 2014 17:39:32 -0700
changeset 1018 30262465b932
parent 1017 186b72e41294
child 1019 0c733dab0036
debugrecordpruneparents: release tr the same way than the lock Nicer code is nicer.
hgext/evolve.py
--- a/hgext/evolve.py	Wed Aug 06 17:37:28 2014 -0700
+++ b/hgext/evolve.py	Wed Aug 06 17:39:32 2014 -0700
@@ -1024,9 +1024,7 @@
         tr.close()
         ui.progress(pgop, None)
     finally:
-        if tr is not None:
-            tr.release()
-        lockmod.release(lock, wlock)
+        lockmod.release(tr, lock, wlock)
 
 @command('debugobsstorestat', [], '')
 def cmddebugobsstorestat(ui, repo):