Show More
@@ -56,9 +56,9 b' Create an extension to test bundle2 API' | |||||
56 | > for chunk in bundler.getchunks(): |
|
56 | > for chunk in bundler.getchunks(): | |
57 | > file.write(chunk) |
|
57 | > file.write(chunk) | |
58 | > |
|
58 | > | |
59 |
> @command(' |
|
59 | > @command('statbundle2', [], '') | |
60 |
> def cmd |
|
60 | > def cmdstatbundle2(ui, repo): | |
61 |
> """ |
|
61 | > """print statistic on the bundle2 container read from stdin""" | |
62 | > unbundler = bundle2.unbundle20(ui, sys.stdin) |
|
62 | > unbundler = bundle2.unbundle20(ui, sys.stdin) | |
63 | > try: |
|
63 | > try: | |
64 | > params = unbundler.params |
|
64 | > params = unbundler.params | |
@@ -105,7 +105,7 b' Test bundling' | |||||
105 |
|
105 | |||
106 | Test unbundling |
|
106 | Test unbundling | |
107 |
|
107 | |||
108 |
$ hg bundle2 | hg |
|
108 | $ hg bundle2 | hg statbundle2 | |
109 | options count: 0 |
|
109 | options count: 0 | |
110 | parts count: 0 |
|
110 | parts count: 0 | |
111 |
|
111 | |||
@@ -113,7 +113,7 b' Test old style bundle are detected and r' | |||||
113 |
|
113 | |||
114 | $ hg bundle --all ../bundle.hg |
|
114 | $ hg bundle --all ../bundle.hg | |
115 | 1 changesets found |
|
115 | 1 changesets found | |
116 |
$ hg |
|
116 | $ hg statbundle2 < ../bundle.hg | |
117 | abort: unknown bundle version 10 |
|
117 | abort: unknown bundle version 10 | |
118 | [255] |
|
118 | [255] | |
119 |
|
119 | |||
@@ -135,7 +135,7 b' Test generation simple option' | |||||
135 |
|
135 | |||
136 | Test unbundling |
|
136 | Test unbundling | |
137 |
|
137 | |||
138 |
$ hg bundle2 --param 'caution' | hg |
|
138 | $ hg bundle2 --param 'caution' | hg statbundle2 | |
139 | options count: 1 |
|
139 | options count: 1 | |
140 | - caution |
|
140 | - caution | |
141 | parts count: 0 |
|
141 | parts count: 0 | |
@@ -147,7 +147,7 b' Test generation multiple option' | |||||
147 |
|
147 | |||
148 | Test unbundling |
|
148 | Test unbundling | |
149 |
|
149 | |||
150 |
$ hg bundle2 --param 'caution' --param 'meal' | hg |
|
150 | $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2 | |
151 | options count: 2 |
|
151 | options count: 2 | |
152 | - caution |
|
152 | - caution | |
153 | - meal |
|
153 | - meal | |
@@ -163,7 +163,7 b' Test generation' | |||||
163 |
|
163 | |||
164 | Test unbundling |
|
164 | Test unbundling | |
165 |
|
165 | |||
166 |
$ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg |
|
166 | $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2 | |
167 | options count: 3 |
|
167 | options count: 3 | |
168 | - caution |
|
168 | - caution | |
169 | - elephants |
|
169 | - elephants | |
@@ -181,7 +181,7 b' Test generation' | |||||
181 |
|
181 | |||
182 | Test unbundling |
|
182 | Test unbundling | |
183 |
|
183 | |||
184 |
$ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg |
|
184 | $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2 | |
185 | options count: 2 |
|
185 | options count: 2 | |
186 | - e|! 7/ |
|
186 | - e|! 7/ | |
187 | babar%#==tutu |
|
187 | babar%#==tutu | |
@@ -191,7 +191,7 b' Test unbundling' | |||||
191 | Test unknown mandatory option |
|
191 | Test unknown mandatory option | |
192 | --------------------------------------------------- |
|
192 | --------------------------------------------------- | |
193 |
|
193 | |||
194 |
$ hg bundle2 --param 'Gravity' | hg |
|
194 | $ hg bundle2 --param 'Gravity' | hg statbundle2 | |
195 | abort: unknown parameters: 'Gravity' |
|
195 | abort: unknown parameters: 'Gravity' | |
196 | [255] |
|
196 | [255] | |
197 |
|
197 | |||
@@ -213,7 +213,7 b' file content is ok' | |||||
213 |
|
213 | |||
214 | unbundling debug |
|
214 | unbundling debug | |
215 |
|
215 | |||
216 |
$ hg |
|
216 | $ hg statbundle2 --debug < ../out.hg2 | |
217 | start processing of HG20 stream |
|
217 | start processing of HG20 stream | |
218 | reading bundle2 stream parameters |
|
218 | reading bundle2 stream parameters | |
219 | ignoring unknown parameter 'e|! 7/' |
|
219 | ignoring unknown parameter 'e|! 7/' | |
@@ -265,7 +265,7 b' Test part' | |||||
265 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00' test:math\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
|
265 | Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00' test:math\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x00 (no-eol) (esc) | |
266 |
|
266 | |||
267 |
|
267 | |||
268 |
$ hg |
|
268 | $ hg statbundle2 < ../parts.hg2 | |
269 | options count: 0 |
|
269 | options count: 0 | |
270 | parts count: 4 |
|
270 | parts count: 4 | |
271 | :test:empty: |
|
271 | :test:empty: | |
@@ -285,7 +285,7 b' Test part' | |||||
285 | advisory: 1 |
|
285 | advisory: 1 | |
286 | payload: 2 bytes |
|
286 | payload: 2 bytes | |
287 |
|
287 | |||
288 |
$ hg |
|
288 | $ hg statbundle2 --debug < ../parts.hg2 | |
289 | start processing of HG20 stream |
|
289 | start processing of HG20 stream | |
290 | reading bundle2 stream parameters |
|
290 | reading bundle2 stream parameters | |
291 | options count: 0 |
|
291 | options count: 0 |
General Comments 0
You need to be logged in to leave comments.
Login now