[pushrebase] Handle client not accepting obsoletion part

Summary:
The function already raises ValueError if it can't generate a suitable part
for the remote; catch it and continue otherwise

Test Plan: Run test

Reviewers: pyd, durham

Reviewed By: durham

Subscribers: akushner, sid0, davidsp, mpm, daviser, rmcelroy

Differential Revision: https://phabricator.fb.com/D1700817

Signature: t1:1700817:1416868855:cad7838c2c9be0d0657adda28d0d1796c119a4ef
This commit is contained in:
Eric Sumner 2014-11-24 11:18:33 -08:00
parent 44c7735be5
commit afe0305ccb

View File

@ -353,11 +353,15 @@ def bundle2rebase(op, part):
cgpart.addparam('version', '01')
if (obsolete.isenabled(op.repo, obsolete.exchangeopt)
and op.repo.obsstore): # TODO: check reply caps
exchange.buildobsmarkerspart(
op.reply,
op.repo.obsstore.relevantmarkers(replacements.values())
)
and op.repo.obsstore):
try:
exchange.buildobsmarkerspart(
op.reply,
op.repo.obsstore.relevantmarkers(replacements.values())
)
except ValueError, exc:
op.repo.ui.status(_("can't send obsolete markers: %s") %
exc.message)
for k in replacements.keys():
replacements[hex(k)] = hex(replacements[k])