# HG changeset patch # User Pierre-Yves David # Date 1433577027 25200 # Node ID 219b8ab3122024853e9fd1fc572b2a00b650d48f # Parent 8cd0159207df2287ab6b71125dc9c38256f49491 bundle2: also capture reply capability on failure When unbundling over the wire is aborted, we have a mechanism to convey the error inside a bundle part. As we add support for more errors, we need to know if the client will support them. For this purpose, we duck punch the reply capabilities of the client on the raised extensions. This is similar to what is done to salvage the server output on error. diff -r 8cd0159207df -r 219b8ab31220 mercurial/bundle2.py --- a/mercurial/bundle2.py Sat Jun 06 00:32:19 2015 -0700 +++ b/mercurial/bundle2.py Sat Jun 06 00:50:27 2015 -0700 @@ -347,8 +347,11 @@ # craziness in a future version. exc.duringunbundle2 = True salvaged = [] + replycaps = None if op.reply is not None: salvaged = op.reply.salvageoutput() + replycaps = op.reply.capabilities + exc._replycaps = replycaps exc._bundle2salvagedoutput = salvaged raise finally: