exchange: add "streaming all changes" to bundle2 pulling
This is the beginning of client-side support for performing a stream
clone using bundle2. The main bundle2 pull function checks whether to
perform a streaming clone and outputs a message if so.
While we have a duplicate message, it seems easier to have all the
bundle2 console writing in one location and in an easy-to-read
conditional block.
--- a/mercurial/exchange.py Sun Oct 04 12:07:01 2015 -0700
+++ b/mercurial/exchange.py Sun Oct 04 12:11:44 2015 -0700
@@ -1075,6 +1075,9 @@
For now, the only supported data are changegroup."""
kwargs = {'bundlecaps': caps20to10(pullop.repo)}
+
+ streaming, streamreqs = streamclone.canperformstreamclone(pullop)
+
# pulling changegroup
pullop.stepsdone.add('changegroup')
@@ -1087,7 +1090,9 @@
# make sure to always includes bookmark data when migrating
# `hg incoming --bundle` to using this function.
kwargs['listkeys'].append('bookmarks')
- if not pullop.fetch:
+ if streaming:
+ pullop.repo.ui.status(_('streaming all changes\n'))
+ elif not pullop.fetch:
pullop.repo.ui.status(_("no changes found\n"))
pullop.cgresult = 0
else: