diff mercurial/bundle2.py @ 21135:98fbf3adfd83

bundle2: add capabilities support in `replycaps` part This part now contains a list of supported capabilities.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Apr 2014 11:32:30 -0400
parents 2f8c4fa237f5
children b6fd496e5c72
line wrap: on
line diff
--- a/mercurial/bundle2.py	Wed Apr 16 23:55:59 2014 -0400
+++ b/mercurial/bundle2.py	Thu Apr 17 11:32:30 2014 -0400
@@ -697,7 +697,8 @@
 def handlereplycaps(op, inpart):
     """Notify that a reply bundle should be created
 
-    Will convey bundle capability at some point too."""
+    the part payload is a list of capabilities (one per line)"""
+    caps = [c for c in inpart.read().splitlines() if c]
     if op.reply is None:
-        op.reply = bundle20(op.ui)
+        op.reply = bundle20(op.ui, caps)