##// END OF EJS Templates
bundle2: add a test for exceptions raised during the generation process...
Pierre-Yves David -
r23007:03f3af8f default
parent child Browse files
Show More
@@ -1,769 +1,802 b''
1 This test is decicated to test the bundle2 container format
1 This test is decicated to test the bundle2 container format
2
2
3 It test multiple existing parts to test different feature of the container. You
3 It test multiple existing parts to test different feature of the container. You
4 probably do not need to touch this test unless you change the binary encoding
4 probably do not need to touch this test unless you change the binary encoding
5 of the bundle2 format itself.
5 of the bundle2 format itself.
6
6
7 Create an extension to test bundle2 API
7 Create an extension to test bundle2 API
8
8
9 $ cat > bundle2.py << EOF
9 $ cat > bundle2.py << EOF
10 > """A small extension to test bundle2 implementation
10 > """A small extension to test bundle2 implementation
11 >
11 >
12 > Current bundle2 implementation is far too limited to be used in any core
12 > Current bundle2 implementation is far too limited to be used in any core
13 > code. We still need to be able to test it while it grow up.
13 > code. We still need to be able to test it while it grow up.
14 > """
14 > """
15 >
15 >
16 > import sys, os
16 > import sys, os
17 > from mercurial import cmdutil
17 > from mercurial import cmdutil
18 > from mercurial import util
18 > from mercurial import util
19 > from mercurial import bundle2
19 > from mercurial import bundle2
20 > from mercurial import scmutil
20 > from mercurial import scmutil
21 > from mercurial import discovery
21 > from mercurial import discovery
22 > from mercurial import changegroup
22 > from mercurial import changegroup
23 > from mercurial import error
23 > from mercurial import error
24 > from mercurial import obsolete
24 > from mercurial import obsolete
25 >
25 >
26 >
26 >
27 > try:
27 > try:
28 > import msvcrt
28 > import msvcrt
29 > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
29 > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
30 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
30 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
31 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
31 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
32 > except ImportError:
32 > except ImportError:
33 > pass
33 > pass
34 >
34 >
35 > cmdtable = {}
35 > cmdtable = {}
36 > command = cmdutil.command(cmdtable)
36 > command = cmdutil.command(cmdtable)
37 >
37 >
38 > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
38 > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
39 > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
39 > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
40 > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko."""
40 > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko."""
41 > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it.
41 > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it.
42 >
42 >
43 > @bundle2.parthandler('test:song')
43 > @bundle2.parthandler('test:song')
44 > def songhandler(op, part):
44 > def songhandler(op, part):
45 > """handle a "test:song" bundle2 part, printing the lyrics on stdin"""
45 > """handle a "test:song" bundle2 part, printing the lyrics on stdin"""
46 > op.ui.write('The choir starts singing:\n')
46 > op.ui.write('The choir starts singing:\n')
47 > verses = 0
47 > verses = 0
48 > for line in part.read().split('\n'):
48 > for line in part.read().split('\n'):
49 > op.ui.write(' %s\n' % line)
49 > op.ui.write(' %s\n' % line)
50 > verses += 1
50 > verses += 1
51 > op.records.add('song', {'verses': verses})
51 > op.records.add('song', {'verses': verses})
52 >
52 >
53 > @bundle2.parthandler('test:ping')
53 > @bundle2.parthandler('test:ping')
54 > def pinghandler(op, part):
54 > def pinghandler(op, part):
55 > op.ui.write('received ping request (id %i)\n' % part.id)
55 > op.ui.write('received ping request (id %i)\n' % part.id)
56 > if op.reply is not None and 'ping-pong' in op.reply.capabilities:
56 > if op.reply is not None and 'ping-pong' in op.reply.capabilities:
57 > op.ui.write_err('replying to ping request (id %i)\n' % part.id)
57 > op.ui.write_err('replying to ping request (id %i)\n' % part.id)
58 > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))])
58 > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))])
59 >
59 >
60 > @bundle2.parthandler('test:debugreply')
60 > @bundle2.parthandler('test:debugreply')
61 > def debugreply(op, part):
61 > def debugreply(op, part):
62 > """print data about the capacity of the bundle reply"""
62 > """print data about the capacity of the bundle reply"""
63 > if op.reply is None:
63 > if op.reply is None:
64 > op.ui.write('debugreply: no reply\n')
64 > op.ui.write('debugreply: no reply\n')
65 > else:
65 > else:
66 > op.ui.write('debugreply: capabilities:\n')
66 > op.ui.write('debugreply: capabilities:\n')
67 > for cap in sorted(op.reply.capabilities):
67 > for cap in sorted(op.reply.capabilities):
68 > op.ui.write('debugreply: %r\n' % cap)
68 > op.ui.write('debugreply: %r\n' % cap)
69 > for val in op.reply.capabilities[cap]:
69 > for val in op.reply.capabilities[cap]:
70 > op.ui.write('debugreply: %r\n' % val)
70 > op.ui.write('debugreply: %r\n' % val)
71 >
71 >
72 > @command('bundle2',
72 > @command('bundle2',
73 > [('', 'param', [], 'stream level parameter'),
73 > [('', 'param', [], 'stream level parameter'),
74 > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'),
74 > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'),
75 > ('', 'unknownparams', False, 'include an unknown part parameters in the bundle'),
75 > ('', 'unknownparams', False, 'include an unknown part parameters in the bundle'),
76 > ('', 'parts', False, 'include some arbitrary parts to the bundle'),
76 > ('', 'parts', False, 'include some arbitrary parts to the bundle'),
77 > ('', 'reply', False, 'produce a reply bundle'),
77 > ('', 'reply', False, 'produce a reply bundle'),
78 > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'),
78 > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'),
79 > ('', 'genraise', False, 'includes a part that raise an exception during generation'),
79 > ('r', 'rev', [], 'includes those changeset in the bundle'),],
80 > ('r', 'rev', [], 'includes those changeset in the bundle'),],
80 > '[OUTPUTFILE]')
81 > '[OUTPUTFILE]')
81 > def cmdbundle2(ui, repo, path=None, **opts):
82 > def cmdbundle2(ui, repo, path=None, **opts):
82 > """write a bundle2 container on standard ouput"""
83 > """write a bundle2 container on standard ouput"""
83 > bundler = bundle2.bundle20(ui)
84 > bundler = bundle2.bundle20(ui)
84 > for p in opts['param']:
85 > for p in opts['param']:
85 > p = p.split('=', 1)
86 > p = p.split('=', 1)
86 > try:
87 > try:
87 > bundler.addparam(*p)
88 > bundler.addparam(*p)
88 > except ValueError, exc:
89 > except ValueError, exc:
89 > raise util.Abort('%s' % exc)
90 > raise util.Abort('%s' % exc)
90 >
91 >
91 > if opts['reply']:
92 > if opts['reply']:
92 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville'
93 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville'
93 > bundler.newpart('b2x:replycaps', data=capsstring)
94 > bundler.newpart('b2x:replycaps', data=capsstring)
94 >
95 >
95 > if opts['pushrace']:
96 > if opts['pushrace']:
96 > # also serve to test the assignement of data outside of init
97 > # also serve to test the assignement of data outside of init
97 > part = bundler.newpart('b2x:check:heads')
98 > part = bundler.newpart('b2x:check:heads')
98 > part.data = '01234567890123456789'
99 > part.data = '01234567890123456789'
99 >
100 >
100 > revs = opts['rev']
101 > revs = opts['rev']
101 > if 'rev' in opts:
102 > if 'rev' in opts:
102 > revs = scmutil.revrange(repo, opts['rev'])
103 > revs = scmutil.revrange(repo, opts['rev'])
103 > if revs:
104 > if revs:
104 > # very crude version of a changegroup part creation
105 > # very crude version of a changegroup part creation
105 > bundled = repo.revs('%ld::%ld', revs, revs)
106 > bundled = repo.revs('%ld::%ld', revs, revs)
106 > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)]
107 > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)]
107 > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)]
108 > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)]
108 > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing)
109 > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing)
109 > cg = changegroup.getlocalchangegroup(repo, 'test:bundle2', outgoing, None)
110 > cg = changegroup.getlocalchangegroup(repo, 'test:bundle2', outgoing, None)
110 > bundler.newpart('b2x:changegroup', data=cg.getchunks())
111 > bundler.newpart('b2x:changegroup', data=cg.getchunks())
111 >
112 >
112 > if opts['parts']:
113 > if opts['parts']:
113 > bundler.newpart('test:empty')
114 > bundler.newpart('test:empty')
114 > # add a second one to make sure we handle multiple parts
115 > # add a second one to make sure we handle multiple parts
115 > bundler.newpart('test:empty')
116 > bundler.newpart('test:empty')
116 > bundler.newpart('test:song', data=ELEPHANTSSONG)
117 > bundler.newpart('test:song', data=ELEPHANTSSONG)
117 > bundler.newpart('test:debugreply')
118 > bundler.newpart('test:debugreply')
118 > mathpart = bundler.newpart('test:math')
119 > mathpart = bundler.newpart('test:math')
119 > mathpart.addparam('pi', '3.14')
120 > mathpart.addparam('pi', '3.14')
120 > mathpart.addparam('e', '2.72')
121 > mathpart.addparam('e', '2.72')
121 > mathpart.addparam('cooking', 'raw', mandatory=False)
122 > mathpart.addparam('cooking', 'raw', mandatory=False)
122 > mathpart.data = '42'
123 > mathpart.data = '42'
123 > # advisory known part with unknown mandatory param
124 > # advisory known part with unknown mandatory param
124 > bundler.newpart('test:song', [('randomparam','')])
125 > bundler.newpart('test:song', [('randomparam','')])
125 > if opts['unknown']:
126 > if opts['unknown']:
126 > bundler.newpart('test:UNKNOWN', data='some random content')
127 > bundler.newpart('test:UNKNOWN', data='some random content')
127 > if opts['unknownparams']:
128 > if opts['unknownparams']:
128 > bundler.newpart('test:SONG', [('randomparams', '')])
129 > bundler.newpart('test:SONG', [('randomparams', '')])
129 > if opts['parts']:
130 > if opts['parts']:
130 > bundler.newpart('test:ping')
131 > bundler.newpart('test:ping')
132 > if opts['genraise']:
133 > def genraise():
134 > yield 'first line\n'
135 > raise RuntimeError('Someone set up us the bomb!')
136 > bundler.newpart('b2x:output', data=genraise())
131 >
137 >
132 > if path is None:
138 > if path is None:
133 > file = sys.stdout
139 > file = sys.stdout
134 > else:
140 > else:
135 > file = open(path, 'wb')
141 > file = open(path, 'wb')
136 >
142 >
137 > for chunk in bundler.getchunks():
143 > try:
138 > file.write(chunk)
144 > for chunk in bundler.getchunks():
145 > file.write(chunk)
146 > except RuntimeError, exc:
147 > raise util.Abort(exc)
139 >
148 >
140 > @command('unbundle2', [], '')
149 > @command('unbundle2', [], '')
141 > def cmdunbundle2(ui, repo, replypath=None):
150 > def cmdunbundle2(ui, repo, replypath=None):
142 > """process a bundle2 stream from stdin on the current repo"""
151 > """process a bundle2 stream from stdin on the current repo"""
143 > try:
152 > try:
144 > tr = None
153 > tr = None
145 > lock = repo.lock()
154 > lock = repo.lock()
146 > tr = repo.transaction('processbundle')
155 > tr = repo.transaction('processbundle')
147 > try:
156 > try:
148 > unbundler = bundle2.unbundle20(ui, sys.stdin)
157 > unbundler = bundle2.unbundle20(ui, sys.stdin)
149 > op = bundle2.processbundle(repo, unbundler, lambda: tr)
158 > op = bundle2.processbundle(repo, unbundler, lambda: tr)
150 > tr.close()
159 > tr.close()
151 > except error.BundleValueError, exc:
160 > except error.BundleValueError, exc:
152 > raise util.Abort('missing support for %s' % exc)
161 > raise util.Abort('missing support for %s' % exc)
153 > except error.PushRaced, exc:
162 > except error.PushRaced, exc:
154 > raise util.Abort('push race: %s' % exc)
163 > raise util.Abort('push race: %s' % exc)
155 > finally:
164 > finally:
156 > if tr is not None:
165 > if tr is not None:
157 > tr.release()
166 > tr.release()
158 > lock.release()
167 > lock.release()
159 > remains = sys.stdin.read()
168 > remains = sys.stdin.read()
160 > ui.write('%i unread bytes\n' % len(remains))
169 > ui.write('%i unread bytes\n' % len(remains))
161 > if op.records['song']:
170 > if op.records['song']:
162 > totalverses = sum(r['verses'] for r in op.records['song'])
171 > totalverses = sum(r['verses'] for r in op.records['song'])
163 > ui.write('%i total verses sung\n' % totalverses)
172 > ui.write('%i total verses sung\n' % totalverses)
164 > for rec in op.records['changegroup']:
173 > for rec in op.records['changegroup']:
165 > ui.write('addchangegroup return: %i\n' % rec['return'])
174 > ui.write('addchangegroup return: %i\n' % rec['return'])
166 > if op.reply is not None and replypath is not None:
175 > if op.reply is not None and replypath is not None:
167 > file = open(replypath, 'wb')
176 > file = open(replypath, 'wb')
168 > for chunk in op.reply.getchunks():
177 > for chunk in op.reply.getchunks():
169 > file.write(chunk)
178 > file.write(chunk)
170 >
179 >
171 > @command('statbundle2', [], '')
180 > @command('statbundle2', [], '')
172 > def cmdstatbundle2(ui, repo):
181 > def cmdstatbundle2(ui, repo):
173 > """print statistic on the bundle2 container read from stdin"""
182 > """print statistic on the bundle2 container read from stdin"""
174 > unbundler = bundle2.unbundle20(ui, sys.stdin)
183 > unbundler = bundle2.unbundle20(ui, sys.stdin)
175 > try:
184 > try:
176 > params = unbundler.params
185 > params = unbundler.params
177 > except error.BundleValueError, exc:
186 > except error.BundleValueError, exc:
178 > raise util.Abort('unknown parameters: %s' % exc)
187 > raise util.Abort('unknown parameters: %s' % exc)
179 > ui.write('options count: %i\n' % len(params))
188 > ui.write('options count: %i\n' % len(params))
180 > for key in sorted(params):
189 > for key in sorted(params):
181 > ui.write('- %s\n' % key)
190 > ui.write('- %s\n' % key)
182 > value = params[key]
191 > value = params[key]
183 > if value is not None:
192 > if value is not None:
184 > ui.write(' %s\n' % value)
193 > ui.write(' %s\n' % value)
185 > count = 0
194 > count = 0
186 > for p in unbundler.iterparts():
195 > for p in unbundler.iterparts():
187 > count += 1
196 > count += 1
188 > ui.write(' :%s:\n' % p.type)
197 > ui.write(' :%s:\n' % p.type)
189 > ui.write(' mandatory: %i\n' % len(p.mandatoryparams))
198 > ui.write(' mandatory: %i\n' % len(p.mandatoryparams))
190 > ui.write(' advisory: %i\n' % len(p.advisoryparams))
199 > ui.write(' advisory: %i\n' % len(p.advisoryparams))
191 > ui.write(' payload: %i bytes\n' % len(p.read()))
200 > ui.write(' payload: %i bytes\n' % len(p.read()))
192 > ui.write('parts count: %i\n' % count)
201 > ui.write('parts count: %i\n' % count)
193 > EOF
202 > EOF
194 $ cat >> $HGRCPATH << EOF
203 $ cat >> $HGRCPATH << EOF
195 > [extensions]
204 > [extensions]
196 > bundle2=$TESTTMP/bundle2.py
205 > bundle2=$TESTTMP/bundle2.py
197 > [experimental]
206 > [experimental]
198 > bundle2-exp=True
207 > bundle2-exp=True
199 > evolution=createmarkers
208 > evolution=createmarkers
200 > [ui]
209 > [ui]
201 > ssh=python "$TESTDIR/dummyssh"
210 > ssh=python "$TESTDIR/dummyssh"
202 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
211 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
203 > [web]
212 > [web]
204 > push_ssl = false
213 > push_ssl = false
205 > allow_push = *
214 > allow_push = *
206 > [phases]
215 > [phases]
207 > publish=False
216 > publish=False
208 > EOF
217 > EOF
209
218
210 The extension requires a repo (currently unused)
219 The extension requires a repo (currently unused)
211
220
212 $ hg init main
221 $ hg init main
213 $ cd main
222 $ cd main
214 $ touch a
223 $ touch a
215 $ hg add a
224 $ hg add a
216 $ hg commit -m 'a'
225 $ hg commit -m 'a'
217
226
218
227
219 Empty bundle
228 Empty bundle
220 =================
229 =================
221
230
222 - no option
231 - no option
223 - no parts
232 - no parts
224
233
225 Test bundling
234 Test bundling
226
235
227 $ hg bundle2
236 $ hg bundle2
228 HG2X\x00\x00\x00\x00 (no-eol) (esc)
237 HG2X\x00\x00\x00\x00 (no-eol) (esc)
229
238
230 Test unbundling
239 Test unbundling
231
240
232 $ hg bundle2 | hg statbundle2
241 $ hg bundle2 | hg statbundle2
233 options count: 0
242 options count: 0
234 parts count: 0
243 parts count: 0
235
244
236 Test old style bundle are detected and refused
245 Test old style bundle are detected and refused
237
246
238 $ hg bundle --all ../bundle.hg
247 $ hg bundle --all ../bundle.hg
239 1 changesets found
248 1 changesets found
240 $ hg statbundle2 < ../bundle.hg
249 $ hg statbundle2 < ../bundle.hg
241 abort: unknown bundle version 10
250 abort: unknown bundle version 10
242 [255]
251 [255]
243
252
244 Test parameters
253 Test parameters
245 =================
254 =================
246
255
247 - some options
256 - some options
248 - no parts
257 - no parts
249
258
250 advisory parameters, no value
259 advisory parameters, no value
251 -------------------------------
260 -------------------------------
252
261
253 Simplest possible parameters form
262 Simplest possible parameters form
254
263
255 Test generation simple option
264 Test generation simple option
256
265
257 $ hg bundle2 --param 'caution'
266 $ hg bundle2 --param 'caution'
258 HG2X\x00\x07caution\x00\x00 (no-eol) (esc)
267 HG2X\x00\x07caution\x00\x00 (no-eol) (esc)
259
268
260 Test unbundling
269 Test unbundling
261
270
262 $ hg bundle2 --param 'caution' | hg statbundle2
271 $ hg bundle2 --param 'caution' | hg statbundle2
263 options count: 1
272 options count: 1
264 - caution
273 - caution
265 parts count: 0
274 parts count: 0
266
275
267 Test generation multiple option
276 Test generation multiple option
268
277
269 $ hg bundle2 --param 'caution' --param 'meal'
278 $ hg bundle2 --param 'caution' --param 'meal'
270 HG2X\x00\x0ccaution meal\x00\x00 (no-eol) (esc)
279 HG2X\x00\x0ccaution meal\x00\x00 (no-eol) (esc)
271
280
272 Test unbundling
281 Test unbundling
273
282
274 $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2
283 $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2
275 options count: 2
284 options count: 2
276 - caution
285 - caution
277 - meal
286 - meal
278 parts count: 0
287 parts count: 0
279
288
280 advisory parameters, with value
289 advisory parameters, with value
281 -------------------------------
290 -------------------------------
282
291
283 Test generation
292 Test generation
284
293
285 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants'
294 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants'
286 HG2X\x00\x1ccaution meal=vegan elephants\x00\x00 (no-eol) (esc)
295 HG2X\x00\x1ccaution meal=vegan elephants\x00\x00 (no-eol) (esc)
287
296
288 Test unbundling
297 Test unbundling
289
298
290 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2
299 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2
291 options count: 3
300 options count: 3
292 - caution
301 - caution
293 - elephants
302 - elephants
294 - meal
303 - meal
295 vegan
304 vegan
296 parts count: 0
305 parts count: 0
297
306
298 parameter with special char in value
307 parameter with special char in value
299 ---------------------------------------------------
308 ---------------------------------------------------
300
309
301 Test generation
310 Test generation
302
311
303 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple
312 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple
304 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
313 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
305
314
306 Test unbundling
315 Test unbundling
307
316
308 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2
317 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2
309 options count: 2
318 options count: 2
310 - e|! 7/
319 - e|! 7/
311 babar%#==tutu
320 babar%#==tutu
312 - simple
321 - simple
313 parts count: 0
322 parts count: 0
314
323
315 Test unknown mandatory option
324 Test unknown mandatory option
316 ---------------------------------------------------
325 ---------------------------------------------------
317
326
318 $ hg bundle2 --param 'Gravity' | hg statbundle2
327 $ hg bundle2 --param 'Gravity' | hg statbundle2
319 abort: unknown parameters: Stream Parameter - Gravity
328 abort: unknown parameters: Stream Parameter - Gravity
320 [255]
329 [255]
321
330
322 Test debug output
331 Test debug output
323 ---------------------------------------------------
332 ---------------------------------------------------
324
333
325 bundling debug
334 bundling debug
326
335
327 $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2
336 $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2
328 start emission of HG2X stream
337 start emission of HG2X stream
329 bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple
338 bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple
330 start of parts
339 start of parts
331 end of bundle
340 end of bundle
332
341
333 file content is ok
342 file content is ok
334
343
335 $ cat ../out.hg2
344 $ cat ../out.hg2
336 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
345 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
337
346
338 unbundling debug
347 unbundling debug
339
348
340 $ hg statbundle2 --debug < ../out.hg2
349 $ hg statbundle2 --debug < ../out.hg2
341 start processing of HG2X stream
350 start processing of HG2X stream
342 reading bundle2 stream parameters
351 reading bundle2 stream parameters
343 ignoring unknown parameter 'e|! 7/'
352 ignoring unknown parameter 'e|! 7/'
344 ignoring unknown parameter 'simple'
353 ignoring unknown parameter 'simple'
345 options count: 2
354 options count: 2
346 - e|! 7/
355 - e|! 7/
347 babar%#==tutu
356 babar%#==tutu
348 - simple
357 - simple
349 start extraction of bundle2 parts
358 start extraction of bundle2 parts
350 part header size: 0
359 part header size: 0
351 end of bundle2 stream
360 end of bundle2 stream
352 parts count: 0
361 parts count: 0
353
362
354
363
355 Test buggy input
364 Test buggy input
356 ---------------------------------------------------
365 ---------------------------------------------------
357
366
358 empty parameter name
367 empty parameter name
359
368
360 $ hg bundle2 --param '' --quiet
369 $ hg bundle2 --param '' --quiet
361 abort: empty parameter name
370 abort: empty parameter name
362 [255]
371 [255]
363
372
364 bad parameter name
373 bad parameter name
365
374
366 $ hg bundle2 --param 42babar
375 $ hg bundle2 --param 42babar
367 abort: non letter first character: '42babar'
376 abort: non letter first character: '42babar'
368 [255]
377 [255]
369
378
370
379
371 Test part
380 Test part
372 =================
381 =================
373
382
374 $ hg bundle2 --parts ../parts.hg2 --debug
383 $ hg bundle2 --parts ../parts.hg2 --debug
375 start emission of HG2X stream
384 start emission of HG2X stream
376 bundle parameter:
385 bundle parameter:
377 start of parts
386 start of parts
378 bundle part: "test:empty"
387 bundle part: "test:empty"
379 bundle part: "test:empty"
388 bundle part: "test:empty"
380 bundle part: "test:song"
389 bundle part: "test:song"
381 bundle part: "test:debugreply"
390 bundle part: "test:debugreply"
382 bundle part: "test:math"
391 bundle part: "test:math"
383 bundle part: "test:song"
392 bundle part: "test:song"
384 bundle part: "test:ping"
393 bundle part: "test:ping"
385 end of bundle
394 end of bundle
386
395
387 $ cat ../parts.hg2
396 $ cat ../parts.hg2
388 HG2X\x00\x00\x00\x11 (esc)
397 HG2X\x00\x00\x00\x11 (esc)
389 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc)
398 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc)
390 test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc)
399 test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc)
391 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
400 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
392 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00\x16\x0ftest:debugreply\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00+ test:math\x00\x00\x00\x04\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x1d test:song\x00\x00\x00\x05\x01\x00\x0b\x00randomparam\x00\x00\x00\x00\x00\x10 test:ping\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
401 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00\x16\x0ftest:debugreply\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00+ test:math\x00\x00\x00\x04\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x1d test:song\x00\x00\x00\x05\x01\x00\x0b\x00randomparam\x00\x00\x00\x00\x00\x10 test:ping\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
393
402
394
403
395 $ hg statbundle2 < ../parts.hg2
404 $ hg statbundle2 < ../parts.hg2
396 options count: 0
405 options count: 0
397 :test:empty:
406 :test:empty:
398 mandatory: 0
407 mandatory: 0
399 advisory: 0
408 advisory: 0
400 payload: 0 bytes
409 payload: 0 bytes
401 :test:empty:
410 :test:empty:
402 mandatory: 0
411 mandatory: 0
403 advisory: 0
412 advisory: 0
404 payload: 0 bytes
413 payload: 0 bytes
405 :test:song:
414 :test:song:
406 mandatory: 0
415 mandatory: 0
407 advisory: 0
416 advisory: 0
408 payload: 178 bytes
417 payload: 178 bytes
409 :test:debugreply:
418 :test:debugreply:
410 mandatory: 0
419 mandatory: 0
411 advisory: 0
420 advisory: 0
412 payload: 0 bytes
421 payload: 0 bytes
413 :test:math:
422 :test:math:
414 mandatory: 2
423 mandatory: 2
415 advisory: 1
424 advisory: 1
416 payload: 2 bytes
425 payload: 2 bytes
417 :test:song:
426 :test:song:
418 mandatory: 1
427 mandatory: 1
419 advisory: 0
428 advisory: 0
420 payload: 0 bytes
429 payload: 0 bytes
421 :test:ping:
430 :test:ping:
422 mandatory: 0
431 mandatory: 0
423 advisory: 0
432 advisory: 0
424 payload: 0 bytes
433 payload: 0 bytes
425 parts count: 7
434 parts count: 7
426
435
427 $ hg statbundle2 --debug < ../parts.hg2
436 $ hg statbundle2 --debug < ../parts.hg2
428 start processing of HG2X stream
437 start processing of HG2X stream
429 reading bundle2 stream parameters
438 reading bundle2 stream parameters
430 options count: 0
439 options count: 0
431 start extraction of bundle2 parts
440 start extraction of bundle2 parts
432 part header size: 17
441 part header size: 17
433 part type: "test:empty"
442 part type: "test:empty"
434 part id: "0"
443 part id: "0"
435 part parameters: 0
444 part parameters: 0
436 :test:empty:
445 :test:empty:
437 mandatory: 0
446 mandatory: 0
438 advisory: 0
447 advisory: 0
439 payload chunk size: 0
448 payload chunk size: 0
440 payload: 0 bytes
449 payload: 0 bytes
441 part header size: 17
450 part header size: 17
442 part type: "test:empty"
451 part type: "test:empty"
443 part id: "1"
452 part id: "1"
444 part parameters: 0
453 part parameters: 0
445 :test:empty:
454 :test:empty:
446 mandatory: 0
455 mandatory: 0
447 advisory: 0
456 advisory: 0
448 payload chunk size: 0
457 payload chunk size: 0
449 payload: 0 bytes
458 payload: 0 bytes
450 part header size: 16
459 part header size: 16
451 part type: "test:song"
460 part type: "test:song"
452 part id: "2"
461 part id: "2"
453 part parameters: 0
462 part parameters: 0
454 :test:song:
463 :test:song:
455 mandatory: 0
464 mandatory: 0
456 advisory: 0
465 advisory: 0
457 payload chunk size: 178
466 payload chunk size: 178
458 payload chunk size: 0
467 payload chunk size: 0
459 payload: 178 bytes
468 payload: 178 bytes
460 part header size: 22
469 part header size: 22
461 part type: "test:debugreply"
470 part type: "test:debugreply"
462 part id: "3"
471 part id: "3"
463 part parameters: 0
472 part parameters: 0
464 :test:debugreply:
473 :test:debugreply:
465 mandatory: 0
474 mandatory: 0
466 advisory: 0
475 advisory: 0
467 payload chunk size: 0
476 payload chunk size: 0
468 payload: 0 bytes
477 payload: 0 bytes
469 part header size: 43
478 part header size: 43
470 part type: "test:math"
479 part type: "test:math"
471 part id: "4"
480 part id: "4"
472 part parameters: 3
481 part parameters: 3
473 :test:math:
482 :test:math:
474 mandatory: 2
483 mandatory: 2
475 advisory: 1
484 advisory: 1
476 payload chunk size: 2
485 payload chunk size: 2
477 payload chunk size: 0
486 payload chunk size: 0
478 payload: 2 bytes
487 payload: 2 bytes
479 part header size: 29
488 part header size: 29
480 part type: "test:song"
489 part type: "test:song"
481 part id: "5"
490 part id: "5"
482 part parameters: 1
491 part parameters: 1
483 :test:song:
492 :test:song:
484 mandatory: 1
493 mandatory: 1
485 advisory: 0
494 advisory: 0
486 payload chunk size: 0
495 payload chunk size: 0
487 payload: 0 bytes
496 payload: 0 bytes
488 part header size: 16
497 part header size: 16
489 part type: "test:ping"
498 part type: "test:ping"
490 part id: "6"
499 part id: "6"
491 part parameters: 0
500 part parameters: 0
492 :test:ping:
501 :test:ping:
493 mandatory: 0
502 mandatory: 0
494 advisory: 0
503 advisory: 0
495 payload chunk size: 0
504 payload chunk size: 0
496 payload: 0 bytes
505 payload: 0 bytes
497 part header size: 0
506 part header size: 0
498 end of bundle2 stream
507 end of bundle2 stream
499 parts count: 7
508 parts count: 7
500
509
501 Test actual unbundling of test part
510 Test actual unbundling of test part
502 =======================================
511 =======================================
503
512
504 Process the bundle
513 Process the bundle
505
514
506 $ hg unbundle2 --debug < ../parts.hg2
515 $ hg unbundle2 --debug < ../parts.hg2
507 start processing of HG2X stream
516 start processing of HG2X stream
508 reading bundle2 stream parameters
517 reading bundle2 stream parameters
509 start extraction of bundle2 parts
518 start extraction of bundle2 parts
510 part header size: 17
519 part header size: 17
511 part type: "test:empty"
520 part type: "test:empty"
512 part id: "0"
521 part id: "0"
513 part parameters: 0
522 part parameters: 0
514 ignoring unsupported advisory part test:empty
523 ignoring unsupported advisory part test:empty
515 payload chunk size: 0
524 payload chunk size: 0
516 part header size: 17
525 part header size: 17
517 part type: "test:empty"
526 part type: "test:empty"
518 part id: "1"
527 part id: "1"
519 part parameters: 0
528 part parameters: 0
520 ignoring unsupported advisory part test:empty
529 ignoring unsupported advisory part test:empty
521 payload chunk size: 0
530 payload chunk size: 0
522 part header size: 16
531 part header size: 16
523 part type: "test:song"
532 part type: "test:song"
524 part id: "2"
533 part id: "2"
525 part parameters: 0
534 part parameters: 0
526 found a handler for part 'test:song'
535 found a handler for part 'test:song'
527 The choir starts singing:
536 The choir starts singing:
528 payload chunk size: 178
537 payload chunk size: 178
529 payload chunk size: 0
538 payload chunk size: 0
530 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
539 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
531 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
540 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
532 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
541 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
533 part header size: 22
542 part header size: 22
534 part type: "test:debugreply"
543 part type: "test:debugreply"
535 part id: "3"
544 part id: "3"
536 part parameters: 0
545 part parameters: 0
537 found a handler for part 'test:debugreply'
546 found a handler for part 'test:debugreply'
538 debugreply: no reply
547 debugreply: no reply
539 payload chunk size: 0
548 payload chunk size: 0
540 part header size: 43
549 part header size: 43
541 part type: "test:math"
550 part type: "test:math"
542 part id: "4"
551 part id: "4"
543 part parameters: 3
552 part parameters: 3
544 ignoring unsupported advisory part test:math
553 ignoring unsupported advisory part test:math
545 payload chunk size: 2
554 payload chunk size: 2
546 payload chunk size: 0
555 payload chunk size: 0
547 part header size: 29
556 part header size: 29
548 part type: "test:song"
557 part type: "test:song"
549 part id: "5"
558 part id: "5"
550 part parameters: 1
559 part parameters: 1
551 found a handler for part 'test:song'
560 found a handler for part 'test:song'
552 ignoring unsupported advisory part test:song - randomparam
561 ignoring unsupported advisory part test:song - randomparam
553 payload chunk size: 0
562 payload chunk size: 0
554 part header size: 16
563 part header size: 16
555 part type: "test:ping"
564 part type: "test:ping"
556 part id: "6"
565 part id: "6"
557 part parameters: 0
566 part parameters: 0
558 found a handler for part 'test:ping'
567 found a handler for part 'test:ping'
559 received ping request (id 6)
568 received ping request (id 6)
560 payload chunk size: 0
569 payload chunk size: 0
561 part header size: 0
570 part header size: 0
562 end of bundle2 stream
571 end of bundle2 stream
563 0 unread bytes
572 0 unread bytes
564 3 total verses sung
573 3 total verses sung
565
574
566 Unbundle with an unknown mandatory part
575 Unbundle with an unknown mandatory part
567 (should abort)
576 (should abort)
568
577
569 $ hg bundle2 --parts --unknown ../unknown.hg2
578 $ hg bundle2 --parts --unknown ../unknown.hg2
570
579
571 $ hg unbundle2 < ../unknown.hg2
580 $ hg unbundle2 < ../unknown.hg2
572 The choir starts singing:
581 The choir starts singing:
573 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
582 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
574 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
583 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
575 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
584 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
576 debugreply: no reply
585 debugreply: no reply
577 0 unread bytes
586 0 unread bytes
578 abort: missing support for test:unknown
587 abort: missing support for test:unknown
579 [255]
588 [255]
580
589
581 Unbundle with an unknown mandatory part parameters
590 Unbundle with an unknown mandatory part parameters
582 (should abort)
591 (should abort)
583
592
584 $ hg bundle2 --unknownparams ../unknown.hg2
593 $ hg bundle2 --unknownparams ../unknown.hg2
585
594
586 $ hg unbundle2 < ../unknown.hg2
595 $ hg unbundle2 < ../unknown.hg2
587 0 unread bytes
596 0 unread bytes
588 abort: missing support for test:song - randomparams
597 abort: missing support for test:song - randomparams
589 [255]
598 [255]
590
599
591 unbundle with a reply
600 unbundle with a reply
592
601
593 $ hg bundle2 --parts --reply ../parts-reply.hg2
602 $ hg bundle2 --parts --reply ../parts-reply.hg2
594 $ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2
603 $ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2
595 0 unread bytes
604 0 unread bytes
596 3 total verses sung
605 3 total verses sung
597
606
598 The reply is a bundle
607 The reply is a bundle
599
608
600 $ cat ../reply.hg2
609 $ cat ../reply.hg2
601 HG2X\x00\x00\x00\x1f (esc)
610 HG2X\x00\x00\x00\x1f (esc)
602 b2x:output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc)
611 b2x:output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc)
603 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
612 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
604 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
613 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
605 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
614 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
606 \x00\x00\x00\x00\x00\x1f (esc)
615 \x00\x00\x00\x00\x00\x1f (esc)
607 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc)
616 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc)
608 debugreply: 'city=!'
617 debugreply: 'city=!'
609 debugreply: 'celeste,ville'
618 debugreply: 'celeste,ville'
610 debugreply: 'elephants'
619 debugreply: 'elephants'
611 debugreply: 'babar'
620 debugreply: 'babar'
612 debugreply: 'celeste'
621 debugreply: 'celeste'
613 debugreply: 'ping-pong'
622 debugreply: 'ping-pong'
614 \x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to7\x00\x00\x00\x00\x00\x1f (esc)
623 \x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to7\x00\x00\x00\x00\x00\x1f (esc)
615 b2x:output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to7\x00\x00\x00=received ping request (id 7) (esc)
624 b2x:output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to7\x00\x00\x00=received ping request (id 7) (esc)
616 replying to ping request (id 7)
625 replying to ping request (id 7)
617 \x00\x00\x00\x00\x00\x00 (no-eol) (esc)
626 \x00\x00\x00\x00\x00\x00 (no-eol) (esc)
618
627
619 The reply is valid
628 The reply is valid
620
629
621 $ hg statbundle2 < ../reply.hg2
630 $ hg statbundle2 < ../reply.hg2
622 options count: 0
631 options count: 0
623 :b2x:output:
632 :b2x:output:
624 mandatory: 0
633 mandatory: 0
625 advisory: 1
634 advisory: 1
626 payload: 217 bytes
635 payload: 217 bytes
627 :b2x:output:
636 :b2x:output:
628 mandatory: 0
637 mandatory: 0
629 advisory: 1
638 advisory: 1
630 payload: 201 bytes
639 payload: 201 bytes
631 :test:pong:
640 :test:pong:
632 mandatory: 1
641 mandatory: 1
633 advisory: 0
642 advisory: 0
634 payload: 0 bytes
643 payload: 0 bytes
635 :b2x:output:
644 :b2x:output:
636 mandatory: 0
645 mandatory: 0
637 advisory: 1
646 advisory: 1
638 payload: 61 bytes
647 payload: 61 bytes
639 parts count: 4
648 parts count: 4
640
649
641 Unbundle the reply to get the output:
650 Unbundle the reply to get the output:
642
651
643 $ hg unbundle2 < ../reply.hg2
652 $ hg unbundle2 < ../reply.hg2
644 remote: The choir starts singing:
653 remote: The choir starts singing:
645 remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
654 remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
646 remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
655 remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
647 remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
656 remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
648 remote: debugreply: capabilities:
657 remote: debugreply: capabilities:
649 remote: debugreply: 'city=!'
658 remote: debugreply: 'city=!'
650 remote: debugreply: 'celeste,ville'
659 remote: debugreply: 'celeste,ville'
651 remote: debugreply: 'elephants'
660 remote: debugreply: 'elephants'
652 remote: debugreply: 'babar'
661 remote: debugreply: 'babar'
653 remote: debugreply: 'celeste'
662 remote: debugreply: 'celeste'
654 remote: debugreply: 'ping-pong'
663 remote: debugreply: 'ping-pong'
655 remote: received ping request (id 7)
664 remote: received ping request (id 7)
656 remote: replying to ping request (id 7)
665 remote: replying to ping request (id 7)
657 0 unread bytes
666 0 unread bytes
658
667
659 Test push race detection
668 Test push race detection
660
669
661 $ hg bundle2 --pushrace ../part-race.hg2
670 $ hg bundle2 --pushrace ../part-race.hg2
662
671
663 $ hg unbundle2 < ../part-race.hg2
672 $ hg unbundle2 < ../part-race.hg2
664 0 unread bytes
673 0 unread bytes
665 abort: push race: repository changed while pushing - please try again
674 abort: push race: repository changed while pushing - please try again
666 [255]
675 [255]
667
676
668 Support for changegroup
677 Support for changegroup
669 ===================================
678 ===================================
670
679
671 $ hg unbundle $TESTDIR/bundles/rebase.hg
680 $ hg unbundle $TESTDIR/bundles/rebase.hg
672 adding changesets
681 adding changesets
673 adding manifests
682 adding manifests
674 adding file changes
683 adding file changes
675 added 8 changesets with 7 changes to 7 files (+3 heads)
684 added 8 changesets with 7 changes to 7 files (+3 heads)
676 (run 'hg heads' to see heads, 'hg merge' to merge)
685 (run 'hg heads' to see heads, 'hg merge' to merge)
677
686
678 $ hg log -G
687 $ hg log -G
679 o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H
688 o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H
680 |
689 |
681 | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G
690 | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G
682 |/|
691 |/|
683 o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
692 o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
684 | |
693 | |
685 | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
694 | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
686 |/
695 |/
687 | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D
696 | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D
688 | |
697 | |
689 | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C
698 | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C
690 | |
699 | |
691 | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B
700 | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B
692 |/
701 |/
693 o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A
702 o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A
694
703
695 @ 0:3903775176ed draft test a
704 @ 0:3903775176ed draft test a
696
705
697
706
698 $ hg bundle2 --debug --rev '8+7+5+4' ../rev.hg2
707 $ hg bundle2 --debug --rev '8+7+5+4' ../rev.hg2
699 4 changesets found
708 4 changesets found
700 list of changesets:
709 list of changesets:
701 32af7686d403cf45b5d95f2d70cebea587ac806a
710 32af7686d403cf45b5d95f2d70cebea587ac806a
702 9520eea781bcca16c1e15acc0ba14335a0e8e5ba
711 9520eea781bcca16c1e15acc0ba14335a0e8e5ba
703 eea13746799a9e0bfd88f29d3c2e9dc9389f524f
712 eea13746799a9e0bfd88f29d3c2e9dc9389f524f
704 02de42196ebee42ef284b6780a87cdc96e8eaab6
713 02de42196ebee42ef284b6780a87cdc96e8eaab6
705 start emission of HG2X stream
714 start emission of HG2X stream
706 bundle parameter:
715 bundle parameter:
707 start of parts
716 start of parts
708 bundle part: "b2x:changegroup"
717 bundle part: "b2x:changegroup"
709 bundling: 1/4 changesets (25.00%)
718 bundling: 1/4 changesets (25.00%)
710 bundling: 2/4 changesets (50.00%)
719 bundling: 2/4 changesets (50.00%)
711 bundling: 3/4 changesets (75.00%)
720 bundling: 3/4 changesets (75.00%)
712 bundling: 4/4 changesets (100.00%)
721 bundling: 4/4 changesets (100.00%)
713 bundling: 1/4 manifests (25.00%)
722 bundling: 1/4 manifests (25.00%)
714 bundling: 2/4 manifests (50.00%)
723 bundling: 2/4 manifests (50.00%)
715 bundling: 3/4 manifests (75.00%)
724 bundling: 3/4 manifests (75.00%)
716 bundling: 4/4 manifests (100.00%)
725 bundling: 4/4 manifests (100.00%)
717 bundling: D 1/3 files (33.33%)
726 bundling: D 1/3 files (33.33%)
718 bundling: E 2/3 files (66.67%)
727 bundling: E 2/3 files (66.67%)
719 bundling: H 3/3 files (100.00%)
728 bundling: H 3/3 files (100.00%)
720 end of bundle
729 end of bundle
721
730
722 $ cat ../rev.hg2
731 $ cat ../rev.hg2
723 HG2X\x00\x00\x00\x16\x0fb2x:changegroup\x00\x00\x00\x00\x00\x00\x00\x00\x06\x13\x00\x00\x00\xa42\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j_\xdd\xd9\x89W\xc8\xa5JMCm\xfe\x1d\xa9\xd8\x7f!\xa1\xb9{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c (esc)
732 HG2X\x00\x00\x00\x16\x0fb2x:changegroup\x00\x00\x00\x00\x00\x00\x00\x00\x06\x13\x00\x00\x00\xa42\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j_\xdd\xd9\x89W\xc8\xa5JMCm\xfe\x1d\xa9\xd8\x7f!\xa1\xb9{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c (esc)
724 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc)
733 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc)
725 \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01D\x00\x00\x00\xa4\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xcd\x01\x0b\x8c\xd9\x98\xf3\x98\x1aZ\x81\x15\xf9O\x8d\xa4\xabP`\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)4dece9c826f69490507b98c6383a3009b295837d (esc)
734 \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01D\x00\x00\x00\xa4\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xcd\x01\x0b\x8c\xd9\x98\xf3\x98\x1aZ\x81\x15\xf9O\x8d\xa4\xabP`\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)4dece9c826f69490507b98c6383a3009b295837d (esc)
726 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc)
735 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc)
727 \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01E\x00\x00\x00\xa2\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)365b93d57fdf4814e2b5911d6bacff2b12014441 (esc)
736 \x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01E\x00\x00\x00\xa2\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)365b93d57fdf4814e2b5911d6bacff2b12014441 (esc)
728 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x00\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01G\x00\x00\x00\xa4\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
737 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x00\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01G\x00\x00\x00\xa4\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
729 \x87\xcd\xc9n\x8e\xaa\xb6$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
738 \x87\xcd\xc9n\x8e\xaa\xb6$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
730 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc)
739 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc)
731 \x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc)
740 \x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc)
732 \x00\x00\x00g\x00\x00\x00h\x00\x00\x00\x01H\x00\x00\x00\x00\x00\x00\x00\x8bn\x1fLG\xec\xb53\xff\xd0\xc8\xe5,\xdc\x88\xaf\xb6\xcd9\xe2\x0cf\xa5\xa0\x18\x17\xfd\xf5#\x9c'8\x02\xb5\xb7a\x8d\x05\x1c\x89\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+D\x00c3f1ca2924c16a19b0656a84900e504e5b0aec2d (esc)
741 \x00\x00\x00g\x00\x00\x00h\x00\x00\x00\x01H\x00\x00\x00\x00\x00\x00\x00\x8bn\x1fLG\xec\xb53\xff\xd0\xc8\xe5,\xdc\x88\xaf\xb6\xcd9\xe2\x0cf\xa5\xa0\x18\x17\xfd\xf5#\x9c'8\x02\xb5\xb7a\x8d\x05\x1c\x89\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+D\x00c3f1ca2924c16a19b0656a84900e504e5b0aec2d (esc)
733 \x00\x00\x00\x8bM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\x00}\x8c\x9d\x88\x84\x13%\xf5\xc6\xb0cq\xb3[N\x8a+\x1a\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00+\x00\x00\x00\xac\x00\x00\x00+E\x009c6fd0350a6c0d0c49d4a9c5017cf07043f54e58 (esc)
742 \x00\x00\x00\x8bM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\x00}\x8c\x9d\x88\x84\x13%\xf5\xc6\xb0cq\xb3[N\x8a+\x1a\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00+\x00\x00\x00\xac\x00\x00\x00+E\x009c6fd0350a6c0d0c49d4a9c5017cf07043f54e58 (esc)
734 \x00\x00\x00\x8b6[\x93\xd5\x7f\xdfH\x14\xe2\xb5\x91\x1dk\xac\xff+\x12\x01DA(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xceM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00V\x00\x00\x00V\x00\x00\x00+F\x0022bfcfd62a21a3287edbd4d656218d0f525ed76a (esc)
743 \x00\x00\x00\x8b6[\x93\xd5\x7f\xdfH\x14\xe2\xb5\x91\x1dk\xac\xff+\x12\x01DA(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xceM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00V\x00\x00\x00V\x00\x00\x00+F\x0022bfcfd62a21a3287edbd4d656218d0f525ed76a (esc)
735 \x00\x00\x00\x97\x8b\xeeH\xed\xc71\x85A\xfc\x00\x13\xeeA\xb0\x89'j\x8c$\xbf(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
744 \x00\x00\x00\x97\x8b\xeeH\xed\xc71\x85A\xfc\x00\x13\xeeA\xb0\x89'j\x8c$\xbf(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
736 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00+\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+H\x008500189e74a9e0475e822093bc7db0d631aeb0b4 (esc)
745 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00+\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+H\x008500189e74a9e0475e822093bc7db0d631aeb0b4 (esc)
737 \x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc)
746 \x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc)
738 \xec-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02D (esc)
747 \xec-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02D (esc)
739 \x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc)
748 \x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc)
740 l\r (no-eol) (esc)
749 l\r (no-eol) (esc)
741 \x0cI\xd4\xa9\xc5\x01|\xf0pC\xf5NX\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02E (esc)
750 \x0cI\xd4\xa9\xc5\x01|\xf0pC\xf5NX\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02E (esc)
742 \x00\x00\x00\x00\x00\x00\x00\x05H\x00\x00\x00b\x85\x00\x18\x9et\xa9\xe0G^\x82 \x93\xbc}\xb0\xd61\xae\xb0\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
751 \x00\x00\x00\x00\x00\x00\x00\x05H\x00\x00\x00b\x85\x00\x18\x9et\xa9\xe0G^\x82 \x93\xbc}\xb0\xd61\xae\xb0\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
743 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc)
752 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc)
744 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
753 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
745
754
746 $ hg unbundle2 < ../rev.hg2
755 $ hg unbundle2 < ../rev.hg2
747 adding changesets
756 adding changesets
748 adding manifests
757 adding manifests
749 adding file changes
758 adding file changes
750 added 0 changesets with 0 changes to 3 files
759 added 0 changesets with 0 changes to 3 files
751 0 unread bytes
760 0 unread bytes
752 addchangegroup return: 1
761 addchangegroup return: 1
753
762
754 with reply
763 with reply
755
764
756 $ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2
765 $ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2
757 $ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2
766 $ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2
758 0 unread bytes
767 0 unread bytes
759 addchangegroup return: 1
768 addchangegroup return: 1
760
769
761 $ cat ../rev-reply.hg2
770 $ cat ../rev-reply.hg2
762 HG2X\x00\x00\x003\x15b2x:reply:changegroup\x00\x00\x00\x00\x00\x02\x0b\x01\x06\x01in-reply-to1return1\x00\x00\x00\x00\x00\x1f (esc)
771 HG2X\x00\x00\x003\x15b2x:reply:changegroup\x00\x00\x00\x00\x00\x02\x0b\x01\x06\x01in-reply-to1return1\x00\x00\x00\x00\x00\x1f (esc)
763 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc)
772 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc)
764 adding manifests
773 adding manifests
765 adding file changes
774 adding file changes
766 added 0 changesets with 0 changes to 3 files
775 added 0 changesets with 0 changes to 3 files
767 \x00\x00\x00\x00\x00\x00 (no-eol) (esc)
776 \x00\x00\x00\x00\x00\x00 (no-eol) (esc)
768
777
778 Check handling of exception during generation.
779 ----------------------------------------------
780 (is currently not right)
781
782 $ hg bundle2 --genraise > ../genfailed.hg2
783 abort: Someone set up us the bomb!
784 [255]
785
786 Should still be a valid bundle
787 (is currently not right)
788
789 $ cat ../genfailed.hg2
790 HG2X\x00\x00\x00\x11 (esc)
791 b2x:output\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
792
793 And its handling on the other size raise a clean exception
794 (is currently not right)
795
796 $ cat ../genfailed.hg2 | hg unbundle2
797 0 unread bytes
798 abort: stream ended unexpectedly (got 0 bytes, expected 2)
799 [255]
800
801
769 $ cd ..
802 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now