##// END OF EJS Templates
bundle2: move version of stream clone into part name...
Gregory Szorc -
r35806:b116a66b default
parent child Browse files
Show More
@@ -2130,12 +2130,9 b' def bundle2getvars(op, part):'
2130 hookargs[key] = value
2130 hookargs[key] = value
2131 op.addhookargs(hookargs)
2131 op.addhookargs(hookargs)
2132
2132
2133 @parthandler('stream', ('requirements', 'filecount', 'bytecount', 'version'))
2133 @parthandler('stream2', ('requirements', 'filecount', 'bytecount'))
2134 def handlestreambundle(op, part):
2134 def handlestreamv2bundle(op, part):
2135
2135
2136 version = part.params['version']
2137 if version != 'v2':
2138 raise error.Abort(_('unknown stream bundle version %s') % version)
2139 requirements = part.params['requirements'].split()
2136 requirements = part.params['requirements'].split()
2140 filecount = int(part.params['filecount'])
2137 filecount = int(part.params['filecount'])
2141 bytecount = int(part.params['bytecount'])
2138 bytecount = int(part.params['bytecount'])
@@ -1767,9 +1767,9 b' def getbundlechunks(repo, source, heads='
1767
1767
1768 return info, bundler.getchunks()
1768 return info, bundler.getchunks()
1769
1769
1770 @getbundle2partsgenerator('stream')
1770 @getbundle2partsgenerator('stream2')
1771 def _getbundlestream(bundler, repo, source, bundlecaps=None,
1771 def _getbundlestream2(bundler, repo, source, bundlecaps=None,
1772 b2caps=None, heads=None, common=None, **kwargs):
1772 b2caps=None, heads=None, common=None, **kwargs):
1773 if not kwargs.get('stream', False):
1773 if not kwargs.get('stream', False):
1774 return
1774 return
1775
1775
@@ -1780,11 +1780,10 b' def _getbundlestream(bundler, repo, sour'
1780
1780
1781 filecount, bytecount, it = streamclone.generatev2(repo)
1781 filecount, bytecount, it = streamclone.generatev2(repo)
1782 requirements = ' '.join(sorted(repo.requirements))
1782 requirements = ' '.join(sorted(repo.requirements))
1783 part = bundler.newpart('stream', data=it)
1783 part = bundler.newpart('stream2', data=it)
1784 part.addparam('bytecount', '%d' % bytecount, mandatory=True)
1784 part.addparam('bytecount', '%d' % bytecount, mandatory=True)
1785 part.addparam('filecount', '%d' % filecount, mandatory=True)
1785 part.addparam('filecount', '%d' % filecount, mandatory=True)
1786 part.addparam('requirements', requirements, mandatory=True)
1786 part.addparam('requirements', requirements, mandatory=True)
1787 part.addparam('version', 'v2', mandatory=True)
1788
1787
1789 @getbundle2partsgenerator('changegroup')
1788 @getbundle2partsgenerator('changegroup')
1790 def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
1789 def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
@@ -55,23 +55,23 b' getbundle requests with stream=1 are unc'
55
55
56
56
57 $ f --size --hex --bytes 256 body
57 $ f --size --hex --bytes 256 body
58 body: size=112328
58 body: size=112318
59 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
59 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
60 0010: 72 06 53 54 52 45 41 4d 00 00 00 00 04 00 09 05 |r.STREAM........|
60 0010: 68 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |h.STREAM2.......|
61 0020: 09 04 0c 2d 07 02 62 79 74 65 63 6f 75 6e 74 39 |...-..bytecount9|
61 0020: 05 09 04 0c 2d 62 79 74 65 63 6f 75 6e 74 39 38 |....-bytecount98|
62 0030: 38 37 35 38 66 69 6c 65 63 6f 75 6e 74 31 30 33 |8758filecount103|
62 0030: 37 35 38 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |758filecount1030|
63 0040: 30 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |0requirementsdot|
63 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
64 0050: 65 6e 63 6f 64 65 20 66 6e 63 61 63 68 65 20 67 |encode fncache g|
64 0050: 6e 63 6f 64 65 20 66 6e 63 61 63 68 65 20 67 65 |ncode fncache ge|
65 0060: 65 6e 65 72 61 6c 64 65 6c 74 61 20 72 65 76 6c |eneraldelta revl|
65 0060: 6e 65 72 61 6c 64 65 6c 74 61 20 72 65 76 6c 6f |neraldelta revlo|
66 0070: 6f 67 76 31 20 73 74 6f 72 65 76 65 72 73 69 6f |ogv1 storeversio|
66 0070: 67 76 31 20 73 74 6f 72 65 00 00 10 00 73 08 42 |gv1 store....s.B|
67 0080: 6e 76 32 00 00 10 00 73 08 42 64 61 74 61 2f 30 |nv2....s.Bdata/0|
67 0080: 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 00 00 |data/0.i........|
68 0090: 2e 69 00 03 00 01 00 00 00 00 00 00 00 02 00 00 |.i..............|
68 0090: 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 01 |................|
69 00a0: 00 01 00 00 00 00 00 00 00 01 ff ff ff ff ff ff |................|
69 00a0: ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 23 87 |.........)c.I.#.|
70 00b0: ff ff 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 |...)c.I.#....Vg.|
70 00b0: bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 00 00 |...Vg.g,i..9....|
71 00c0: 67 2c 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 |g,i..9..........|
71 00c0: 00 00 00 00 00 00 00 00 75 30 73 08 42 64 61 74 |........u0s.Bdat|
72 00d0: 00 00 75 30 73 08 42 64 61 74 61 2f 31 2e 69 00 |..u0s.Bdata/1.i.|
72 00d0: 61 2f 31 2e 69 00 03 00 01 00 00 00 00 00 00 00 |a/1.i...........|
73 00e0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................|
73 00e0: 02 00 00 00 01 00 00 00 00 00 00 00 01 ff ff ff |................|
74 00f0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff f9 |................|
74 00f0: ff ff ff ff ff f9 76 da 1d 0d f2 25 6c de 08 db |......v....%l...|
75
75
76 --uncompressed is an alias to --stream
76 --uncompressed is an alias to --stream
77
77
@@ -124,7 +124,7 b' Clone with background file closing enabl'
124 streaming all changes
124 streaming all changes
125 sending getbundle command
125 sending getbundle command
126 bundle2-input-bundle: with-transaction
126 bundle2-input-bundle: with-transaction
127 bundle2-input-part: "stream" (params: 4 mandatory) supported
127 bundle2-input-part: "stream2" (params: 3 mandatory) supported
128 applying stream bundle
128 applying stream bundle
129 1030 files to transfer, 96.4 KB of data
129 1030 files to transfer, 96.4 KB of data
130 starting 4 threads for background file closing
130 starting 4 threads for background file closing
General Comments 0
You need to be logged in to leave comments. Login now