diff mercurial/wireproto.py @ 26469:fb743268510e

streamclone: move payload header generation into own function The stream clone data over the wire protocol contains a header line indicating total file count and data size. In bundle2, this metadata can be captured by a part parameter and doesn't need to be in the body. In preparation for bundle2, have generatev1() return the raw metadata and move the header generation to its own function.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 Oct 2015 19:06:06 -0700
parents 623743010133
children 56b2bcea2529
line wrap: on
line diff
--- a/mercurial/wireproto.py	Sun Oct 04 18:44:46 2015 -0700
+++ b/mercurial/wireproto.py	Sun Oct 04 19:06:06 2015 -0700
@@ -718,7 +718,7 @@
     try:
         # LockError may be raised before the first result is yielded. Don't
         # emit output until we're sure we got the lock successfully.
-        it = streamclone.generatev1(repo)
+        it = streamclone.generatev1wireproto(repo)
         return streamres(getstream(it))
     except error.LockError:
         return '2\n'