Comments
Patch
@@ -321,17 +321,23 @@ def processbundle(repo, unbundler, trans
advisoryparams=[('in-reply-to',
str(part.id))],
data=output)
op.reply.addpart(outpart)
part.read()
- except Exception:
+ except Exception, exc:
if part is not None:
# consume the bundle content
part.read()
for part in iterparts:
# consume the bundle content
part.read()
+ # Small hack to let caller code distincting exception from bundle2
+ # processing fron the ones from bundle1 processing. This is mostly
+ # needed to handle different return code to unbundle according to the
+ # type of bundle. We should probably clean up or drop this return code
+ # crazyness in future version.
+ exc.duringunbundle2 = True
raise
return op
def decodecaps(blob):
"""decode a bundle2 caps bytes blob into a dictionnary