changeset 1018:30262465b932

debugrecordpruneparents: release tr the same way than the lock Nicer code is nicer.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 06 Aug 2014 17:39:32 -0700
parents 186b72e41294
children 0c733dab0036
files hgext/evolve.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):