bundle2: catch UnknownPartError during local push
When doing local push, UnknownPartError from the server will be raised directly
to the client. We need to catch them too.
--- a/mercurial/exchange.py Mon Apr 21 19:43:01 2014 -0700
+++ b/mercurial/exchange.py Tue Apr 22 11:41:34 2014 -0700
@@ -225,7 +225,10 @@
cgpart = bundle2.bundlepart('B2X:CHANGEGROUP', data=cg.getchunks())
bundler.addpart(cgpart)
stream = util.chunkbuffer(bundler.getchunks())
- reply = pushop.remote.unbundle(stream, ['force'], 'push')
+ try:
+ reply = pushop.remote.unbundle(stream, ['force'], 'push')
+ except bundle2.UnknownPartError, exc:
+ raise util.Abort('missing support for %s' % exc)
try:
op = bundle2.processbundle(pushop.repo, reply)
except bundle2.UnknownPartError, exc: