bundle2: catch UnknownPartError during local push stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 22 Apr 2014 11:41:34 -0700
branchstable
changeset 21182 08c84fd99aac
parent 21181 a92619a2dbd7
child 21183 4345274adc4b
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.
mercurial/exchange.py
--- 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: