[PATCH 3 of 4 modernize-streamclone] streamclone: move "streaming all changes" message location

Gregory Szorc gregory.szorc at gmail.com
Sun Oct 4 21:32:39 CDT 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1443985621 25200
#      Sun Oct 04 12:07:01 2015 -0700
# Node ID 7c7141ed5c21ddb9332ccc626ad5ac1c17f7eebb
# Parent  39d3757d69f177811d0503fd1d770f504eb6e099
streamclone: move "streaming all changes" message location

Previously, the message was printed after we requested and started
processing the remote stream. This seems like something that we should
do before calling out to the remote. Moving it also makes it easier to
deal with the bundle2 implementation.

diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py
--- a/mercurial/streamclone.py
+++ b/mercurial/streamclone.py
@@ -112,8 +112,10 @@ def maybeperformlegacystreamclone(pullop
     rbranchmap = None
     if remote.capable('branchmap'):
         rbranchmap = remote.branchmap()
 
+    repo.ui.status(_('streaming all changes\n'))
+
     fp = remote.stream_out()
     l = fp.readline()
     try:
         resp = int(l)
@@ -244,9 +246,8 @@ def consumev1(repo, fp, filecount, bytec
     by this function.
     """
     lock = repo.lock()
     try:
-        repo.ui.status(_('streaming all changes\n'))
         repo.ui.status(_('%d files to transfer, %s of data\n') %
                        (filecount, util.bytecount(bytecount)))
         handled_bytes = 0
         repo.ui.progress(_('clone'), 0, total=bytecount)


More information about the Mercurial-devel mailing list