diff mercurial/exchange.py @ 21130:1ff06386217f

bundle2: introduce `replycaps` part for on-demand reply The bundle2 processing does not create a bundle2 reply by default anymore. It is only done if the client requests it with a `replycaps` part. This part is called `replycaps` as it will eventually contain data about which bundle2 capabilities are supported by the client. We have to add a flag to the test command to control whether a reply is generated or not.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 16 Apr 2014 14:09:35 -0400
parents 19b9f23a8c6f
children d8dd19e09ed4
line wrap: on
line diff
--- a/mercurial/exchange.py	Wed Apr 16 18:41:48 2014 -0400
+++ b/mercurial/exchange.py	Wed Apr 16 14:09:35 2014 -0400
@@ -208,6 +208,7 @@
     evolve in the future."""
     # Send known head to the server for race detection.
     bundler = bundle2.bundle20(pushop.ui)
+    bundler.addpart(bundle2.bundlepart('replycaps'))
     if not pushop.force:
         part = bundle2.bundlepart('CHECK:HEADS', data=iter(pushop.remoteheads))
         bundler.addpart(part)