##// END OF EJS Templates
with: use context manager in rebuildfncache
Bryan O'Sullivan -
r27871:f1c316fd default
parent child Browse files
Show More
@@ -296,12 +296,8 b' def rebuildfncache(ui, repo):'
296 fnc.entries = newentries
296 fnc.entries = newentries
297 fnc._dirty = True
297 fnc._dirty = True
298
298
299 tr = repo.transaction('fncache')
299 with repo.transaction('fncache') as tr:
300 try:
301 fnc.write(tr)
300 fnc.write(tr)
302 tr.close()
303 finally:
304 tr.release()
305 else:
301 else:
306 ui.write(_('fncache already up to date\n'))
302 ui.write(_('fncache already up to date\n'))
307
303
General Comments 0
You need to be logged in to leave comments. Login now