comparison hgext/evolve.py @ 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
comparison
equal deleted inserted replaced
1017:186b72e41294 1018:30262465b932
1022 ui.write('created new markers for %i\n' % rev) 1022 ui.write('created new markers for %i\n' % rev)
1023 ui.progress(pgop, idx, total=pgtotal) 1023 ui.progress(pgop, idx, total=pgtotal)
1024 tr.close() 1024 tr.close()
1025 ui.progress(pgop, None) 1025 ui.progress(pgop, None)
1026 finally: 1026 finally:
1027 if tr is not None: 1027 lockmod.release(tr, lock, wlock)
1028 tr.release()
1029 lockmod.release(lock, wlock)
1030 1028
1031 @command('debugobsstorestat', [], '') 1029 @command('debugobsstorestat', [], '')
1032 def cmddebugobsstorestat(ui, repo): 1030 def cmddebugobsstorestat(ui, repo):
1033 """print statistic about obsolescence markers in the repo""" 1031 """print statistic about obsolescence markers in the repo"""
1034 store = repo.obsstore 1032 store = repo.obsstore