changeset 25492:219b8ab31220

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 06 Jun 2015 00:50:27 -0700
parents 8cd0159207df
children d8e7b0781ad7
files mercurial/bundle2.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: