mercurial/obsolete.py
changeset 35574 09285733ad71
parent 35573 5574629d5d45
child 35837 d8f891ec5d7d
equal deleted inserted replaced
35573:5574629d5d45 35574:09285733ad71
   836         return False
   836         return False
   837     if old:
   837     if old:
   838         repo.ui.warn(_('unexpected old value for %r') % key)
   838         repo.ui.warn(_('unexpected old value for %r') % key)
   839         return False
   839         return False
   840     data = util.b85decode(new)
   840     data = util.b85decode(new)
   841     with repo.lock():
   841     with repo.lock(), repo.transaction('pushkey: obsolete markers') as tr:
   842         tr = repo.transaction('pushkey: obsolete markers')
   842         repo.obsstore.mergemarkers(tr, data)
   843         try:
   843         repo.invalidatevolatilesets()
   844             repo.obsstore.mergemarkers(tr, data)
   844         return True
   845             repo.invalidatevolatilesets()
       
   846             tr.close()
       
   847             return True
       
   848         finally:
       
   849             tr.release()
       
   850 
   845 
   851 # keep compatibility for the 4.3 cycle
   846 # keep compatibility for the 4.3 cycle
   852 def allprecursors(obsstore, nodes, ignoreflags=0):
   847 def allprecursors(obsstore, nodes, ignoreflags=0):
   853     movemsg = 'obsolete.allprecursors moved to obsutil.allprecursors'
   848     movemsg = 'obsolete.allprecursors moved to obsutil.allprecursors'
   854     util.nouideprecwarn(movemsg, '4.3')
   849     util.nouideprecwarn(movemsg, '4.3')