mercurial/repair.py
changeset 27871 f1c316fd91f9
parent 27860 0da102e4f203
child 27873 60ea60fea5f3
equal deleted inserted replaced
27870:ed9950ba091e 27871:f1c316fd91f9
   294             ui.write(_('%d items added, %d removed from fncache\n') %
   294             ui.write(_('%d items added, %d removed from fncache\n') %
   295                      (addcount, removecount))
   295                      (addcount, removecount))
   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 
   308 def stripbmrevset(repo, mark):
   304 def stripbmrevset(repo, mark):
   309     """
   305     """