comparison hgext/obsolete.py @ 409:c4cc1d5eba7a stable

pushkey: properly handle abort during obsolete markers push
author David Douard <david.douard@logilab.fr>
date Tue, 31 Jul 2012 15:23:01 +0200
parents 6b2f50c81967
children 4c1997e41d18 ea7f2a4ad530
comparison
equal deleted inserted replaced
408:6b2f50c81967 409:c4cc1d5eba7a
449 repo.ui.warn(_('unexpected old value') % key) 449 repo.ui.warn(_('unexpected old value') % key)
450 return 0 450 return 0
451 data = base85.b85decode(new) 451 data = base85.b85decode(new)
452 lock = repo.lock() 452 lock = repo.lock()
453 try: 453 try:
454 repo.obsstore.mergemarkers(data) 454 try:
455 return 1 455 repo.obsstore.mergemarkers(data)
456 return 1
457 except util.Abort:
458 return 0
456 finally: 459 finally:
457 lock.release() 460 lock.release()
458 461
459 pushkey.register('obsolete', pushmarker, listmarkers) 462 pushkey.register('obsolete', pushmarker, listmarkers)
460 463