mercurial/exchange.py
changeset 26690 704818fb170d
parent 26689 2c9f15366982
child 26700 dbc3d945ba36
--- a/mercurial/exchange.py	Tue Oct 13 14:55:02 2015 -0700
+++ b/mercurial/exchange.py	Wed Oct 14 10:36:20 2015 -0700
@@ -1179,6 +1179,16 @@
             # make sure to always includes bookmark data when migrating
             # `hg incoming --bundle` to using this function.
             kwargs['listkeys'].append('bookmarks')
+
+    # If this is a full pull / clone and the server supports the clone bundles
+    # feature, tell the server whether we attempted a clone bundle. The
+    # presence of this flag indicates the client supports clone bundles. This
+    # will enable the server to treat clients that support clone bundles
+    # differently from those that don't.
+    if (pullop.remote.capable('clonebundles')
+        and pullop.heads is None and list(pullop.common) == [nullid]):
+        kwargs['cbattempted'] = pullop.clonebundleattempted
+
     if streaming:
         pullop.repo.ui.status(_('streaming all changes\n'))
     elif not pullop.fetch: