Mercurial > hg-stable
diff tests/test-bundle2.t @ 20864:9a75d2559cff
bundle2: support unbundling empty part
We augment the unbundler to make it able to unbundle the empty part we are now
able to bundle.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 19 Mar 2014 23:04:03 -0700 |
parents | 8a6a86c9a5b5 |
children | ddd56f3eb786 |
line wrap: on
line diff
--- a/tests/test-bundle2.t Fri Mar 28 17:00:13 2014 -0700 +++ b/tests/test-bundle2.t Wed Mar 19 23:04:03 2014 -0700 @@ -60,6 +60,8 @@ > ui.write(' %s\n' % value) > parts = list(unbundler) > ui.write('parts count: %i\n' % len(parts)) + > for p in parts: + > ui.write(' :%s:\n' % p.type) > EOF $ cat >> $HGRCPATH << EOF > [extensions] @@ -206,6 +208,7 @@ babar%#==tutu - simple start extraction of bundle2 parts + part header size: 0 end of bundle2 stream parts count: 0 @@ -243,3 +246,27 @@ test:empty\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) + $ hg unbundle2 < ../parts.hg2 + options count: 0 + parts count: 2 + :test:empty: + :test:empty: + + $ hg unbundle2 --debug < ../parts.hg2 + start processing of HG20 stream + reading bundle2 stream parameters + options count: 0 + start extraction of bundle2 parts + part header size: 13 + part type: "test:empty" + part parameters: 0 + payload chunk size: 0 + part header size: 13 + part type: "test:empty" + part parameters: 0 + payload chunk size: 0 + part header size: 0 + end of bundle2 stream + parts count: 2 + :test:empty: + :test:empty: