[PATCH 05 of 12 stable] bundle2: catch UnknownPartError during push
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Tue Apr 22 20:10:49 UTC 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1398134571 25200
# Mon Apr 21 19:42:51 2014 -0700
# Branch stable
# Node ID 54099a51da15a76638242be65943054ffe48a663
# Parent 574682bc8678be8e42609396f418448a5942c1ce
bundle2: catch UnknownPartError during push
We narrow the exception catching while unbundling the push reply.
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -226,11 +226,11 @@ def _pushbundle2(pushop):
bundler.addpart(cgpart)
stream = util.chunkbuffer(bundler.getchunks())
reply = pushop.remote.unbundle(stream, ['force'], 'push')
try:
op = bundle2.processbundle(pushop.repo, reply)
- except KeyError, exc:
+ except bundle2.UnknownPartError, exc:
raise util.Abort('missing support for %s' % exc)
cgreplies = op.records.getreplies(cgpart.id)
assert len(cgreplies['changegroup']) == 1
pushop.ret = cgreplies['changegroup'][0]['return']
_pushbundle2extrareply(pushop, op, extrainfo)
More information about the Mercurial-devel
mailing list