70 > |
70 > |
71 > @command('unbundle2', [], '') |
71 > @command('unbundle2', [], '') |
72 > def cmdunbundle2(ui, repo): |
72 > def cmdunbundle2(ui, repo): |
73 > """process a bundle2 stream from stdin on the current repo""" |
73 > """process a bundle2 stream from stdin on the current repo""" |
74 > try: |
74 > try: |
75 > bundle2.processbundle(repo, sys.stdin) |
75 > try: |
76 > except KeyError, exc: |
76 > bundle2.processbundle(repo, sys.stdin) |
77 > raise util.Abort('missing support for %s' % exc) |
77 > except KeyError, exc: |
|
78 > raise util.Abort('missing support for %s' % exc) |
|
79 > finally: |
|
80 > remains = sys.stdin.read() |
|
81 > ui.write('%i unread bytes\n' % len(remains)) |
78 > |
82 > |
79 > @command('statbundle2', [], '') |
83 > @command('statbundle2', [], '') |
80 > def cmdstatbundle2(ui, repo): |
84 > def cmdstatbundle2(ui, repo): |
81 > """print statistic on the bundle2 container read from stdin""" |
85 > """print statistic on the bundle2 container read from stdin""" |
82 > unbundler = bundle2.unbundle20(ui, sys.stdin) |
86 > unbundler = bundle2.unbundle20(ui, sys.stdin) |
383 payload chunk size: 2 |
387 payload chunk size: 2 |
384 payload chunk size: 0 |
388 payload chunk size: 0 |
385 ignoring unknown advisory part 'test:math' |
389 ignoring unknown advisory part 'test:math' |
386 part header size: 0 |
390 part header size: 0 |
387 end of bundle2 stream |
391 end of bundle2 stream |
|
392 0 unread bytes |
388 |
393 |
389 |
394 |
390 $ hg bundle2 --parts --unknown ../unknown.hg2 |
395 $ hg bundle2 --parts --unknown ../unknown.hg2 |
391 |
396 |
392 $ hg unbundle2 < ../unknown.hg2 |
397 $ hg unbundle2 < ../unknown.hg2 |
393 The choir start singing: |
398 The choir start singing: |
394 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
399 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
395 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
400 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
396 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
401 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
|
402 0 unread bytes |
397 abort: missing support for 'test:unknown' |
403 abort: missing support for 'test:unknown' |
398 [255] |
404 [255] |