Mercurial > hg-stable
annotate tests/test-bundle2.t @ 21605:f9dabfceb259
bundle2: introduce a ``addparam`` method on part
We make it easier to add new parameters after the part creation. As for the
``data`` attribute we make sure the part generation has not begun yet.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 22 May 2014 11:38:40 -0700 |
parents | c399bf961cb9 |
children | 0cfda08afd24 |
rev | line source |
---|---|
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 Create an extension to test bundle2 API |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 $ cat > bundle2.py << EOF |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 > """A small extension to test bundle2 implementation |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 > |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 > Current bundle2 implementation is far too limited to be used in any core |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 > code. We still need to be able to test it while it grow up. |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 > """ |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 > |
21547
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
11 > try: |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
12 > import msvcrt |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
13 > msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
14 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
15 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
16 > except ImportError: |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
17 > pass |
565d45919db8
bundle2: make sure standard stream are binary
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21187
diff
changeset
|
18 > |
20802
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
19 > import sys |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 > from mercurial import cmdutil |
20813
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
21 > from mercurial import util |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 > from mercurial import bundle2 |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
23 > from mercurial import scmutil |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
24 > from mercurial import discovery |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
25 > from mercurial import changegroup |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
26 > from mercurial import error |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 > cmdtable = {} |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
28 > command = cmdutil.command(cmdtable) |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 > |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
30 > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
31 > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
32 > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.""" |
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
33 > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it. |
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
34 > |
20890
ec7fc110faee
bundle2: introduce a `parthandler` decorator
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20889
diff
changeset
|
35 > @bundle2.parthandler('test:song') |
20948
329cd74b52bd
bundle2: introduce a bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20947
diff
changeset
|
36 > def songhandler(op, part): |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
37 > """handle a "test:song" bundle2 part, printing the lyrics on stdin""" |
20948
329cd74b52bd
bundle2: introduce a bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20947
diff
changeset
|
38 > op.ui.write('The choir starts singing:\n') |
20949
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
39 > verses = 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
40 > for line in part.read().split('\n'): |
20948
329cd74b52bd
bundle2: introduce a bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20947
diff
changeset
|
41 > op.ui.write(' %s\n' % line) |
20949
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
42 > verses += 1 |
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
43 > op.records.add('song', {'verses': verses}) |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
44 > |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
45 > @bundle2.parthandler('test:ping') |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
46 > def pinghandler(op, part): |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
47 > op.ui.write('received ping request (id %i)\n' % part.id) |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
48 > if op.reply is not None and 'ping-pong' in op.reply.capabilities: |
21133
bef4a2adc532
bundle2: include stderr when capturing handlers output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21131
diff
changeset
|
49 > op.ui.write_err('replying to ping request (id %i)\n' % part.id) |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
50 > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))]) |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
51 > |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
52 > @bundle2.parthandler('test:debugreply') |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
53 > def debugreply(op, part): |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
54 > """print data about the capacity of the bundle reply""" |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
55 > if op.reply is None: |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
56 > op.ui.write('debugreply: no reply\n') |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
57 > else: |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
58 > op.ui.write('debugreply: capabilities:\n') |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
59 > for cap in sorted(op.reply.capabilities): |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
60 > op.ui.write('debugreply: %r\n' % cap) |
21136
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
61 > for val in op.reply.capabilities[cap]: |
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
62 > op.ui.write('debugreply: %r\n' % val) |
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
63 > |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
64 > @command('bundle2', |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
65 > [('', 'param', [], 'stream level parameter'), |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
66 > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'), |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
67 > ('', 'parts', False, 'include some arbitrary parts to the bundle'), |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
68 > ('', 'reply', False, 'produce a reply bundle'), |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
69 > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'), |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
70 > ('r', 'rev', [], 'includes those changeset in the bundle'),], |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
71 > '[OUTPUTFILE]') |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
72 > def cmdbundle2(ui, repo, path=None, **opts): |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
73 > """write a bundle2 container on standard ouput""" |
20842
938718d72624
bundle2: print debug information during bundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20841
diff
changeset
|
74 > bundler = bundle2.bundle20(ui) |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
75 > for p in opts['param']: |
20809
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
76 > p = p.split('=', 1) |
20813
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
77 > try: |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
78 > bundler.addparam(*p) |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
79 > except ValueError, exc: |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
80 > raise util.Abort('%s' % exc) |
20809
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
81 > |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
82 > if opts['reply']: |
21137
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
83 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville' |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
84 > bundler.newpart('b2x:replycaps', data=capsstring) |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
85 > |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
86 > if opts['pushrace']: |
21604
c399bf961cb9
bundle2: the ability to set ``data`` attribute of the part is now official
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21600
diff
changeset
|
87 > # also serve to test the assignement of data outside of init |
c399bf961cb9
bundle2: the ability to set ``data`` attribute of the part is now official
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21600
diff
changeset
|
88 > part = bundler.newpart('b2x:check:heads') |
c399bf961cb9
bundle2: the ability to set ``data`` attribute of the part is now official
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21600
diff
changeset
|
89 > part.data = '01234567890123456789' |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
90 > |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
91 > revs = opts['rev'] |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
92 > if 'rev' in opts: |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
93 > revs = scmutil.revrange(repo, opts['rev']) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
94 > if revs: |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
95 > # very crude version of a changegroup part creation |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
96 > bundled = repo.revs('%ld::%ld', revs, revs) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
97 > headmissing = [c.node() for c in repo.set('heads(%ld)', revs)] |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
98 > headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)] |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
99 > outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
100 > cg = changegroup.getlocalbundle(repo, 'test:bundle2', outgoing, None) |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
101 > bundler.newpart('b2x:changegroup', data=cg.getchunks()) |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
102 > |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
103 > if opts['parts']: |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
104 > bundler.newpart('test:empty') |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
105 > # add a second one to make sure we handle multiple parts |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
106 > bundler.newpart('test:empty') |
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
107 > bundler.newpart('test:song', data=ELEPHANTSSONG) |
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
108 > bundler.newpart('test:debugreply') |
21605
f9dabfceb259
bundle2: introduce a ``addparam`` method on part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21604
diff
changeset
|
109 > mathpart = bundler.newpart('test:math') |
f9dabfceb259
bundle2: introduce a ``addparam`` method on part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21604
diff
changeset
|
110 > mathpart.addparam('pi', '3.14') |
f9dabfceb259
bundle2: introduce a ``addparam`` method on part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21604
diff
changeset
|
111 > mathpart.addparam('e', '2.72') |
f9dabfceb259
bundle2: introduce a ``addparam`` method on part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21604
diff
changeset
|
112 > mathpart.addparam('cooking', 'raw', mandatory=False) |
f9dabfceb259
bundle2: introduce a ``addparam`` method on part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21604
diff
changeset
|
113 > mathpart.data = '42' |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
114 > if opts['unknown']: |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
115 > bundler.newpart('test:UNKNOWN', data='some random content') |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
116 > if opts['parts']: |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
117 > bundler.newpart('test:ping') |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
118 > |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
119 > if path is None: |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
120 > file = sys.stdout |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
121 > else: |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
122 > file = open(path, 'w') |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
123 > |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
124 > for chunk in bundler.getchunks(): |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
125 > file.write(chunk) |
20802
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
126 > |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
127 > @command('unbundle2', [], '') |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
128 > def cmdunbundle2(ui, repo, replypath=None): |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
129 > """process a bundle2 stream from stdin on the current repo""" |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
130 > try: |
20952
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
131 > tr = None |
20946
e910336539f7
bundle2: lock the repo during unbundle test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20892
diff
changeset
|
132 > lock = repo.lock() |
20952
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
133 > tr = repo.transaction('processbundle') |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
134 > try: |
20947
c33d7bf53812
bundle2: feed a unbundle20 to the `processbundle` function
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20946
diff
changeset
|
135 > unbundler = bundle2.unbundle20(ui, sys.stdin) |
20952
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
136 > op = bundle2.processbundle(repo, unbundler, lambda: tr) |
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
137 > tr.close() |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
138 > except KeyError, exc: |
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
139 > raise util.Abort('missing support for %s' % exc) |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
140 > except error.PushRaced, exc: |
21185
5b3717e1a3ea
bundle2: add an error message to push race error
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21184
diff
changeset
|
141 > raise util.Abort('push race: %s' % exc) |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
142 > finally: |
20952
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
143 > if tr is not None: |
b24ee5076b94
bundle2: make it possible have a global transaction for the unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20951
diff
changeset
|
144 > tr.release() |
20946
e910336539f7
bundle2: lock the repo during unbundle test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20892
diff
changeset
|
145 > lock.release() |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
146 > remains = sys.stdin.read() |
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
147 > ui.write('%i unread bytes\n' % len(remains)) |
20949
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
148 > if op.records['song']: |
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
149 > totalverses = sum(r['verses'] for r in op.records['song']) |
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
150 > ui.write('%i total verses sung\n' % totalverses) |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
151 > for rec in op.records['changegroup']: |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
152 > ui.write('addchangegroup return: %i\n' % rec['return']) |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
153 > if op.reply is not None and replypath is not None: |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
154 > file = open(replypath, 'w') |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
155 > for chunk in op.reply.getchunks(): |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
156 > file.write(chunk) |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
157 > |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
158 > @command('statbundle2', [], '') |
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
159 > def cmdstatbundle2(ui, repo): |
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
160 > """print statistic on the bundle2 container read from stdin""" |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
161 > unbundler = bundle2.unbundle20(ui, sys.stdin) |
20844
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
162 > try: |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
163 > params = unbundler.params |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
164 > except KeyError, exc: |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
165 > raise util.Abort('unknown parameters: %s' % exc) |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
166 > ui.write('options count: %i\n' % len(params)) |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
167 > for key in sorted(params): |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
168 > ui.write('- %s\n' % key) |
20844
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
169 > value = params[key] |
20810
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
170 > if value is not None: |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
171 > ui.write(' %s\n' % value) |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
172 > count = 0 |
21129
07bcbf326c8d
bundle2: use an official iterparts method to unbundle parts
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21075
diff
changeset
|
173 > for p in unbundler.iterparts(): |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
174 > count += 1 |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
175 > ui.write(' :%s:\n' % p.type) |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
176 > ui.write(' mandatory: %i\n' % len(p.mandatoryparams)) |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
177 > ui.write(' advisory: %i\n' % len(p.advisoryparams)) |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
178 > ui.write(' payload: %i bytes\n' % len(p.read())) |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
179 > ui.write('parts count: %i\n' % count) |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
180 > EOF |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
181 $ cat >> $HGRCPATH << EOF |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
182 > [extensions] |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
183 > bundle2=$TESTTMP/bundle2.py |
21147
2a246e737f92
bundle2: move bundle2 config option to section "experimental"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21146
diff
changeset
|
184 > [experimental] |
2a246e737f92
bundle2: move bundle2 config option to section "experimental"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21146
diff
changeset
|
185 > bundle2-exp=True |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
186 > [ui] |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
187 > ssh=python "$TESTDIR/dummyssh" |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
188 > [web] |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
189 > push_ssl = false |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
190 > allow_push = * |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
191 > EOF |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
192 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
193 The extension requires a repo (currently unused) |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
194 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
195 $ hg init main |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
196 $ cd main |
20803
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
197 $ touch a |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
198 $ hg add a |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
199 $ hg commit -m 'a' |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
200 |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
201 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
202 Empty bundle |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
203 ================= |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
204 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
205 - no option |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
206 - no parts |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
207 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
208 Test bundling |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
209 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
210 $ hg bundle2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
211 HG2X\x00\x00\x00\x00 (no-eol) (esc) |
20802
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
212 |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
213 Test unbundling |
20802
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
214 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
215 $ hg bundle2 | hg statbundle2 |
20802
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
216 options count: 0 |
520df53ad26a
bundle2: a very first version of bundle2 unbundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20801
diff
changeset
|
217 parts count: 0 |
20803
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
218 |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
219 Test old style bundle are detected and refused |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
220 |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
221 $ hg bundle --all ../bundle.hg |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
222 1 changesets found |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
223 $ hg statbundle2 < ../bundle.hg |
20803
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
224 abort: unknown bundle version 10 |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
225 [255] |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
226 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
227 Test parameters |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
228 ================= |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
229 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
230 - some options |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
231 - no parts |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
232 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
233 advisory parameters, no value |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
234 ------------------------------- |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
235 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
236 Simplest possible parameters form |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
237 |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
238 Test generation simple option |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
239 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
240 $ hg bundle2 --param 'caution' |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
241 HG2X\x00\x07caution\x00\x00 (no-eol) (esc) |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
242 |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
243 Test unbundling |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
244 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
245 $ hg bundle2 --param 'caution' | hg statbundle2 |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
246 options count: 1 |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
247 - caution |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
248 parts count: 0 |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
249 |
20804
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
250 Test generation multiple option |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
251 |
db9d3991d2c6
bundle2: support bundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20803
diff
changeset
|
252 $ hg bundle2 --param 'caution' --param 'meal' |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
253 HG2X\x00\x0ccaution meal\x00\x00 (no-eol) (esc) |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
254 |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
255 Test unbundling |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
256 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
257 $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2 |
20805
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
258 options count: 2 |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
259 - caution |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
260 - meal |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
261 parts count: 0 |
c5aaeca0cfbf
bundle2: support for unbundling simple parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20804
diff
changeset
|
262 |
20809
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
263 advisory parameters, with value |
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
264 ------------------------------- |
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
265 |
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
266 Test generation |
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
267 |
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
268 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
269 HG2X\x00\x1ccaution meal=vegan elephants\x00\x00 (no-eol) (esc) |
20809
b93bb639451a
bundle2: support for bundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20805
diff
changeset
|
270 |
20810
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
271 Test unbundling |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
272 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
273 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2 |
20810
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
274 options count: 3 |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
275 - caution |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
276 - elephants |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
277 - meal |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
278 vegan |
47293877b54c
bundle2: support for unbundling parameter value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20809
diff
changeset
|
279 parts count: 0 |
20811
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
280 |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
281 parameter with special char in value |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
282 --------------------------------------------------- |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
283 |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
284 Test generation |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
285 |
9785c3f8f598
bundle2: urlquote stream parameter name and value
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20810
diff
changeset
|
286 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
287 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc) |
20812
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
288 |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
289 Test unbundling |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
290 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
291 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2 |
20812
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
292 options count: 2 |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
293 - e|! 7/ |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
294 babar%#==tutu |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
295 - simple |
e2f908773754
bundle2: urlunquote stream parameter name and value during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20811
diff
changeset
|
296 parts count: 0 |
20813
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
297 |
20844
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
298 Test unknown mandatory option |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
299 --------------------------------------------------- |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
300 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
301 $ hg bundle2 --param 'Gravity' | hg statbundle2 |
20844
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
302 abort: unknown parameters: 'Gravity' |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
303 [255] |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
304 |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
305 Test debug output |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
306 --------------------------------------------------- |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
307 |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
308 bundling debug |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
309 |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
310 $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
311 start emission of HG2X stream |
20842
938718d72624
bundle2: print debug information during bundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20841
diff
changeset
|
312 bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
313 start of parts |
20842
938718d72624
bundle2: print debug information during bundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20841
diff
changeset
|
314 end of bundle |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
315 |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
316 file content is ok |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
317 |
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
318 $ cat ../out.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
319 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc) |
20841
cff562fe77a0
bundle2: add ability to write to a file to the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20814
diff
changeset
|
320 |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
321 unbundling debug |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
322 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
323 $ hg statbundle2 --debug < ../out.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
324 start processing of HG2X stream |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
325 reading bundle2 stream parameters |
20844
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
326 ignoring unknown parameter 'e|! 7/' |
2631204d7305
bundle2: implement the mandatory/advisory logic for parameter
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20843
diff
changeset
|
327 ignoring unknown parameter 'simple' |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
328 options count: 2 |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
329 - e|! 7/ |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
330 babar%#==tutu |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
331 - simple |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
332 start extraction of bundle2 parts |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
333 part header size: 0 |
20843
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
334 end of bundle2 stream |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
335 parts count: 0 |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
336 |
0641b41b0b49
bundle2: print debug information during unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20842
diff
changeset
|
337 |
20813
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
338 Test buggy input |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
339 --------------------------------------------------- |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
340 |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
341 empty parameter name |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
342 |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
343 $ hg bundle2 --param '' --quiet |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
344 abort: empty parameter name |
8c74b3ce5b70
bundle2: refuse empty parameter name
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20812
diff
changeset
|
345 [255] |
20814
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
346 |
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
347 bad parameter name |
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
348 |
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
349 $ hg bundle2 --param 42babar |
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
350 abort: non letter first character: '42babar' |
8532f5e1b9df
bundle2: force the first char of parameter to be an letter.
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20813
diff
changeset
|
351 [255] |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
352 |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
353 |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
354 Test part |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
355 ================= |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
356 |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
357 $ hg bundle2 --parts ../parts.hg2 --debug |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
358 start emission of HG2X stream |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
359 bundle parameter: |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
360 start of parts |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
361 bundle part: "test:empty" |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
362 bundle part: "test:empty" |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
363 bundle part: "test:song" |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
364 bundle part: "test:debugreply" |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
365 bundle part: "test:math" |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
366 bundle part: "test:ping" |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
367 end of bundle |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
368 |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
369 $ cat ../parts.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
370 HG2X\x00\x00\x00\x11 (esc) |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
371 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc) |
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
372 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) |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
373 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
374 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\x10 test:ping\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
20856
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
375 |
8a6a86c9a5b5
bundle2: support bundling of empty part (with a type)
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20844
diff
changeset
|
376 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
377 $ hg statbundle2 < ../parts.hg2 |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
378 options count: 0 |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
379 :test:empty: |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
380 mandatory: 0 |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
381 advisory: 0 |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
382 payload: 0 bytes |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
383 :test:empty: |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
384 mandatory: 0 |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
385 advisory: 0 |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
386 payload: 0 bytes |
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
387 :test:song: |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
388 mandatory: 0 |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
389 advisory: 0 |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
390 payload: 178 bytes |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
391 :test:debugreply: |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
392 mandatory: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
393 advisory: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
394 payload: 0 bytes |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
395 :test:math: |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
396 mandatory: 2 |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
397 advisory: 1 |
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
398 payload: 2 bytes |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
399 :test:ping: |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
400 mandatory: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
401 advisory: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
402 payload: 0 bytes |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
403 parts count: 6 |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
404 |
20888
0b0d3800c248
bundle2: rename unbundle2 test command to statbundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20877
diff
changeset
|
405 $ hg statbundle2 --debug < ../parts.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
406 start processing of HG2X stream |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
407 reading bundle2 stream parameters |
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
408 options count: 0 |
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
409 start extraction of bundle2 parts |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
410 part header size: 17 |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
411 part type: "test:empty" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
412 part id: "0" |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
413 part parameters: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
414 :test:empty: |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
415 mandatory: 0 |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
416 advisory: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
417 payload chunk size: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
418 payload: 0 bytes |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
419 part header size: 17 |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
420 part type: "test:empty" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
421 part id: "1" |
20864
9a75d2559cff
bundle2: support unbundling empty part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20856
diff
changeset
|
422 part parameters: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
423 :test:empty: |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
424 mandatory: 0 |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
425 advisory: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
426 payload chunk size: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
427 payload: 0 bytes |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
428 part header size: 16 |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
429 part type: "test:song" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
430 part id: "2" |
20876
ddd56f3eb786
bundle2: support for bundling and unbundling payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20864
diff
changeset
|
431 part parameters: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
432 :test:song: |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
433 mandatory: 0 |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
434 advisory: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
435 payload chunk size: 178 |
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
436 payload chunk size: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
437 payload: 178 bytes |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
438 part header size: 22 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
439 part type: "test:debugreply" |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
440 part id: "3" |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
441 part parameters: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
442 :test:debugreply: |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
443 mandatory: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
444 advisory: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
445 payload chunk size: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
446 payload: 0 bytes |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
447 part header size: 43 |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
448 part type: "test:math" |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
449 part id: "4" |
20877
9e9e3a4e9261
bundle2: part params
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20876
diff
changeset
|
450 part parameters: 3 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
451 :test:math: |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
452 mandatory: 2 |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
453 advisory: 1 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
454 payload chunk size: 2 |
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
455 payload chunk size: 0 |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
456 payload: 2 bytes |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
457 part header size: 16 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
458 part type: "test:ping" |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
459 part id: "5" |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
460 part parameters: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
461 :test:ping: |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
462 mandatory: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
463 advisory: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
464 payload chunk size: 0 |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
465 payload: 0 bytes |
21017
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
466 part header size: 0 |
8de8187e6f48
bundle2: lazily iterate over bundle parts in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21005
diff
changeset
|
467 end of bundle2 stream |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
468 parts count: 6 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
469 |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
470 Test actual unbundling of test part |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
471 ======================================= |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
472 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
473 Process the bundle |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
474 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
475 $ hg unbundle2 --debug < ../parts.hg2 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
476 start processing of HG2X stream |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
477 reading bundle2 stream parameters |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
478 start extraction of bundle2 parts |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
479 part header size: 17 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
480 part type: "test:empty" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
481 part id: "0" |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
482 part parameters: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
483 ignoring unknown advisory part 'test:empty' |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
484 payload chunk size: 0 |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
485 part header size: 17 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
486 part type: "test:empty" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
487 part id: "1" |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
488 part parameters: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
489 ignoring unknown advisory part 'test:empty' |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
490 payload chunk size: 0 |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
491 part header size: 16 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
492 part type: "test:song" |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
493 part id: "2" |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
494 part parameters: 0 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
495 found a handler for part 'test:song' |
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
496 The choir starts singing: |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
497 payload chunk size: 178 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
498 payload chunk size: 0 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
499 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
500 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
501 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
502 part header size: 22 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
503 part type: "test:debugreply" |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
504 part id: "3" |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
505 part parameters: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
506 found a handler for part 'test:debugreply' |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
507 debugreply: no reply |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
508 payload chunk size: 0 |
20995
e995d104c87f
bundle2: add an integer id to part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20955
diff
changeset
|
509 part header size: 43 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
510 part type: "test:math" |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
511 part id: "4" |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
512 part parameters: 3 |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
513 ignoring unknown advisory part 'test:math' |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
514 payload chunk size: 2 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
515 payload chunk size: 0 |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
516 part header size: 16 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
517 part type: "test:ping" |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
518 part id: "5" |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
519 part parameters: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
520 found a handler for part 'test:ping' |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
521 received ping request (id 5) |
21019
3dc09f831a2e
bundle2: lazy unbundle of part payload
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21017
diff
changeset
|
522 payload chunk size: 0 |
20889
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
523 part header size: 0 |
deed5edb72de
bundle2: first version of a bundle processing
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20888
diff
changeset
|
524 end of bundle2 stream |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
525 0 unread bytes |
20949
571f2903ff1e
bundle2: record processing results in the bundleoperation object
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20948
diff
changeset
|
526 3 total verses sung |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
527 |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
528 Unbundle with an unknown mandatory part |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
529 (should abort) |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
530 |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
531 $ hg bundle2 --parts --unknown ../unknown.hg2 |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
532 |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
533 $ hg unbundle2 < ../unknown.hg2 |
20951
f977c732bf34
tests: fix test output typo
Matt Mackall <mpm@selenic.com>
parents:
20950
diff
changeset
|
534 The choir starts singing: |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
535 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
536 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
537 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
538 debugreply: no reply |
20892
6fe95448596d
bundle2: read the whole bundle from stream on abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20891
diff
changeset
|
539 0 unread bytes |
20891
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
540 abort: missing support for 'test:unknown' |
1c6cd23fc221
bundle2: add some distinction between mandatory and advisory part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20890
diff
changeset
|
541 [255] |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
542 |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
543 unbundle with a reply |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
544 |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
545 $ hg bundle2 --parts --reply ../parts-reply.hg2 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
546 $ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2 |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
547 0 unread bytes |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
548 3 total verses sung |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
549 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
550 The reply is a bundle |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
551 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
552 $ cat ../reply.hg2 |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
553 HG2X\x00\x00\x00\x1f (esc) |
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
554 b2x:output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc) |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
555 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
556 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
557 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
558 \x00\x00\x00\x00\x00\x1f (esc) |
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
559 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc) |
21137
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
560 debugreply: 'city=!' |
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
561 debugreply: 'celeste,ville' |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
562 debugreply: 'elephants' |
21136
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
563 debugreply: 'babar' |
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
564 debugreply: 'celeste' |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
565 debugreply: 'ping-pong' |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
566 \x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to6\x00\x00\x00\x00\x00\x1f (esc) |
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
567 b2x:output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to6\x00\x00\x00=received ping request (id 6) (esc) |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
568 replying to ping request (id 6) |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
569 \x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
570 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
571 The reply is valid |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
572 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
573 $ hg statbundle2 < ../reply.hg2 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
574 options count: 0 |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
575 :b2x:output: |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
576 mandatory: 0 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
577 advisory: 1 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
578 payload: 217 bytes |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
579 :b2x:output: |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
580 mandatory: 0 |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
581 advisory: 1 |
21137
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
582 payload: 201 bytes |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
583 :test:pong: |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
584 mandatory: 1 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
585 advisory: 0 |
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
586 payload: 0 bytes |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
587 :b2x:output: |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
588 mandatory: 0 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
589 advisory: 1 |
21133
bef4a2adc532
bundle2: include stderr when capturing handlers output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21131
diff
changeset
|
590 payload: 61 bytes |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
591 parts count: 4 |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
592 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
593 Unbundle the reply to get the output: |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
594 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
595 $ hg unbundle2 < ../reply.hg2 |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
596 remote: The choir starts singing: |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
597 remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
598 remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
599 remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko. |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
600 remote: debugreply: capabilities: |
21137
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
601 remote: debugreply: 'city=!' |
341a083603a5
bundle2: protect capabilities name and values with url quoting
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21136
diff
changeset
|
602 remote: debugreply: 'celeste,ville' |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
603 remote: debugreply: 'elephants' |
21136
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
604 remote: debugreply: 'babar' |
b6fd496e5c72
bundle2: support for capabilities with values
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21135
diff
changeset
|
605 remote: debugreply: 'celeste' |
21135
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
606 remote: debugreply: 'ping-pong' |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
607 remote: received ping request (id 6) |
98fbf3adfd83
bundle2: add capabilities support in `replycaps` part
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21133
diff
changeset
|
608 remote: replying to ping request (id 6) |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
609 0 unread bytes |
20997
d7df4b7378ae
bundle2: produce a bundle2 reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20995
diff
changeset
|
610 |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
611 Test push race detection |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
612 |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
613 $ hg bundle2 --pushrace ../part-race.hg2 |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
614 |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
615 $ hg unbundle2 < ../part-race.hg2 |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
616 0 unread bytes |
21185
5b3717e1a3ea
bundle2: add an error message to push race error
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21184
diff
changeset
|
617 abort: push race: repository changed while pushing - please try again |
21184
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
618 [255] |
28d76afa1568
bundle2: fix raising errors during heads checking
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21183
diff
changeset
|
619 |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
620 Support for changegroup |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
621 =================================== |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
622 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
623 $ hg unbundle $TESTDIR/bundles/rebase.hg |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
624 adding changesets |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
625 adding manifests |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
626 adding file changes |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
627 added 8 changesets with 7 changes to 7 files (+3 heads) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
628 (run 'hg heads' to see heads, 'hg merge' to merge) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
629 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
630 $ hg log -G |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
631 o changeset: 8:02de42196ebe |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
632 | tag: tip |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
633 | parent: 6:24b6387c8c8c |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
634 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
635 | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
636 | summary: H |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
637 | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
638 | o changeset: 7:eea13746799a |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
639 |/| parent: 6:24b6387c8c8c |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
640 | | parent: 5:9520eea781bc |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
641 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
642 | | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
643 | | summary: G |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
644 | | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
645 o | changeset: 6:24b6387c8c8c |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
646 | | parent: 1:cd010b8cd998 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
647 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
648 | | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
649 | | summary: F |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
650 | | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
651 | o changeset: 5:9520eea781bc |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
652 |/ parent: 1:cd010b8cd998 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
653 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
654 | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
655 | summary: E |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
656 | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
657 | o changeset: 4:32af7686d403 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
658 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
659 | | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
660 | | summary: D |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
661 | | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
662 | o changeset: 3:5fddd98957c8 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
663 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
664 | | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
665 | | summary: C |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
666 | | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
667 | o changeset: 2:42ccdea3bb16 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
668 |/ user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
669 | date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
670 | summary: B |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
671 | |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
672 o changeset: 1:cd010b8cd998 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
673 parent: -1:000000000000 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
674 user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
675 date: Sat Apr 30 15:24:48 2011 +0200 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
676 summary: A |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
677 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
678 @ changeset: 0:3903775176ed |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
679 user: test |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
680 date: Thu Jan 01 00:00:00 1970 +0000 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
681 summary: a |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
682 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
683 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
684 $ hg bundle2 --debug --rev '8+7+5+4' ../rev.hg2 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
685 4 changesets found |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
686 list of changesets: |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
687 32af7686d403cf45b5d95f2d70cebea587ac806a |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
688 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
689 eea13746799a9e0bfd88f29d3c2e9dc9389f524f |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
690 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
21144
7a20fe8dc080
bundle2: use HG2X in the header
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21137
diff
changeset
|
691 start emission of HG2X stream |
21001
c93bb6a08fa1
bundle2: support chunk iterator as part data
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20998
diff
changeset
|
692 bundle parameter: |
c93bb6a08fa1
bundle2: support chunk iterator as part data
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20998
diff
changeset
|
693 start of parts |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
694 bundle part: "b2x:changegroup" |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
695 bundling: 1/4 changesets (25.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
696 bundling: 2/4 changesets (50.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
697 bundling: 3/4 changesets (75.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
698 bundling: 4/4 changesets (100.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
699 bundling: 1/4 manifests (25.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
700 bundling: 2/4 manifests (50.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
701 bundling: 3/4 manifests (75.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
702 bundling: 4/4 manifests (100.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
703 bundling: D 1/3 files (33.33%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
704 bundling: E 2/3 files (66.67%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
705 bundling: H 3/3 files (100.00%) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
706 end of bundle |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
707 |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
708 $ cat ../rev.hg2 |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
709 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) |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
710 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
711 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
712 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
713 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
714 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
715 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
716 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
717 \x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
718 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
719 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
720 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
721 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
722 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
723 \x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
724 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
725 \x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
726 l\r (no-eol) (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
727 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
728 \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) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
729 \x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
730 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
731 |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
732 $ hg unbundle2 < ../rev.hg2 |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
733 adding changesets |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
734 adding manifests |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
735 adding file changes |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
736 added 0 changesets with 0 changes to 3 files |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
737 0 unread bytes |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
738 addchangegroup return: 1 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
739 |
21130
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
740 with reply |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
741 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
742 $ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
743 $ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
744 0 unread bytes |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
745 addchangegroup return: 1 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
746 |
1ff06386217f
bundle2: introduce `replycaps` part for on-demand reply
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21129
diff
changeset
|
747 $ cat ../rev-reply.hg2 |
21146
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
748 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) |
4676135ac555
bundle2: move all parts into a `bx2` namespace
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21144
diff
changeset
|
749 b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc) |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
750 adding manifests |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
751 adding file changes |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
752 added 0 changesets with 0 changes to 3 files |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
753 \x00\x00\x00\x00\x00\x00 (no-eol) (esc) |
20998
93a3c5b58635
bundle2: use reply part to return result of addchangegroup
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20997
diff
changeset
|
754 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
755 Real world exchange |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
756 ===================== |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
757 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
758 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
759 clone --pull |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
760 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
761 $ cd .. |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
762 $ hg clone main other --pull --rev 9520eea781bc |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
763 adding changesets |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
764 adding manifests |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
765 adding file changes |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
766 added 2 changesets with 2 changes to 2 files |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
767 updating to branch default |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
768 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
769 $ hg -R other log -G |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
770 @ changeset: 1:9520eea781bc |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
771 | tag: tip |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
772 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
773 | date: Sat Apr 30 15:24:48 2011 +0200 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
774 | summary: E |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
775 | |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
776 o changeset: 0:cd010b8cd998 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
777 user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
778 date: Sat Apr 30 15:24:48 2011 +0200 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
779 summary: A |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
780 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
781 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
782 pull |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
783 |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
784 $ hg -R other pull -r 24b6387c8c8c |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
785 pulling from $TESTTMP/main (glob) |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
786 searching for changes |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
787 adding changesets |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
788 adding manifests |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
789 adding file changes |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
790 added 1 changesets with 1 changes to 1 files (+1 heads) |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
791 (run 'hg heads' to see heads, 'hg merge' to merge) |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
792 |
21584
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
793 pull empty |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
794 |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
795 $ hg -R other pull -r 24b6387c8c8c |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
796 pulling from $TESTTMP/main (glob) |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
797 no changes found |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
798 |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
799 push |
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
800 |
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
801 $ hg -R main push other --rev eea13746799a |
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
802 pushing to other |
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
803 searching for changes |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
804 remote: adding changesets |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
805 remote: adding manifests |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
806 remote: adding file changes |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
807 remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
808 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
809 pull over ssh |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
810 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
811 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --traceback |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
812 pulling from ssh://user@dummy/main |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
813 searching for changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
814 adding changesets |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
815 adding manifests |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
816 adding file changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
817 added 1 changesets with 1 changes to 1 files (+1 heads) |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
818 (run 'hg heads' to see heads, 'hg merge' to merge) |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
819 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
820 pull over http |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
821 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
822 $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
823 $ cat main.pid >> $DAEMON_PIDS |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
824 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
825 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
826 pulling from http://localhost:$HGPORT/ |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
827 searching for changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
828 adding changesets |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
829 adding manifests |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
830 adding file changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
831 added 1 changesets with 1 changes to 1 files (+1 heads) |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
832 (run 'hg heads .' to see heads, 'hg merge' to merge) |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
833 $ cat main-error.log |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
834 |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
835 push over ssh |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
836 |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
837 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
838 pushing to ssh://user@dummy/other |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
839 searching for changes |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
840 remote: adding changesets |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
841 remote: adding manifests |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
842 remote: adding file changes |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
843 remote: added 1 changesets with 1 changes to 1 files |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
844 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
845 push over http |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
846 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
847 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
848 $ cat other.pid >> $DAEMON_PIDS |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
849 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
850 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
851 pushing to http://localhost:$HGPORT2/ |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
852 searching for changes |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
853 remote: adding changesets |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
854 remote: adding manifests |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
855 remote: adding file changes |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
856 remote: added 1 changesets with 1 changes to 1 files |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
857 $ cat other-error.log |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
858 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
859 Check final content. |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
860 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
861 $ hg -R other log -G |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
862 o changeset: 7:32af7686d403 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
863 | tag: tip |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
864 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
865 | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
866 | summary: D |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
867 | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
868 o changeset: 6:5fddd98957c8 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
869 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
870 | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
871 | summary: C |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
872 | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
873 o changeset: 5:42ccdea3bb16 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
874 | parent: 0:cd010b8cd998 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
875 | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
876 | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
877 | summary: B |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
878 | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
879 | o changeset: 4:02de42196ebe |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
880 | | parent: 2:24b6387c8c8c |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
881 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
882 | | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
883 | | summary: H |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
884 | | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
885 | | o changeset: 3:eea13746799a |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
886 | |/| parent: 2:24b6387c8c8c |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
887 | | | parent: 1:9520eea781bc |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
888 | | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
889 | | | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
890 | | | summary: G |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
891 | | | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
892 | o | changeset: 2:24b6387c8c8c |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
893 |/ / parent: 0:cd010b8cd998 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
894 | | user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
895 | | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
896 | | summary: F |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
897 | | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
898 | @ changeset: 1:9520eea781bc |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
899 |/ user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
900 | date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
901 | summary: E |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
902 | |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
903 o changeset: 0:cd010b8cd998 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
904 user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
905 date: Sat Apr 30 15:24:48 2011 +0200 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
906 summary: A |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
907 |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
908 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
909 Error Handling |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
910 ============== |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
911 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
912 Check that errors are properly returned to the client during push. |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
913 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
914 Setting up |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
915 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
916 $ cat > failpush.py << EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
917 > """A small extension that makes push fails when using bundle2 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
918 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
919 > used to test error handling in bundle2 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
920 > """ |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
921 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
922 > from mercurial import util |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
923 > from mercurial import bundle2 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
924 > from mercurial import exchange |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
925 > from mercurial import extensions |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
926 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
927 > def _pushbundle2failpart(orig, pushop, bundler): |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
928 > extradata = orig(pushop, bundler) |
21178
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
929 > reason = pushop.ui.config('failpush', 'reason', None) |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
930 > part = None |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
931 > if reason == 'abort': |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
932 > bundler.newpart('test:abort') |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
933 > if reason == 'unknown': |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
934 > bundler.newpart('TEST:UNKNOWN') |
21186
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
935 > if reason == 'race': |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
936 > # 20 Bytes of crap |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
937 > bundler.newpart('b2x:check:heads', data='01234567890123456789') |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
938 > return extradata |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
939 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
940 > @bundle2.parthandler("test:abort") |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
941 > def handleabort(op, part): |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
942 > raise util.Abort('Abandon ship!', hint="don't panic") |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
943 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
944 > def uisetup(ui): |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
945 > extensions.wrapfunction(exchange, '_pushbundle2extraparts', _pushbundle2failpart) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
946 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
947 > EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
948 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
949 $ cd main |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
950 $ hg up tip |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
951 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
952 $ echo 'I' > I |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
953 $ hg add I |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
954 $ hg ci -m 'I' |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
955 $ hg id |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
956 e7ec4e813ba6 tip |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
957 $ cd .. |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
958 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
959 $ cat << EOF >> $HGRCPATH |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
960 > [extensions] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
961 > failpush=$TESTTMP/failpush.py |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
962 > EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
963 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
964 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
965 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
966 $ cat other.pid >> $DAEMON_PIDS |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
967 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
968 Doing the actual push: Abort error |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
969 |
21178
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
970 $ cat << EOF >> $HGRCPATH |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
971 > [failpush] |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
972 > reason = abort |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
973 > EOF |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
974 |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
975 $ hg -R main push other -r e7ec4e813ba6 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
976 pushing to other |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
977 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
978 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
979 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
980 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
981 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
982 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
983 pushing to ssh://user@dummy/other |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
984 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
985 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
986 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
987 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
988 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
989 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
990 pushing to http://localhost:$HGPORT2/ |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
991 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
992 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
993 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
994 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
995 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
996 |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
997 Doing the actual push: unknown mandatory parts |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
998 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
999 $ cat << EOF >> $HGRCPATH |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1000 > [failpush] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1001 > reason = unknown |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1002 > EOF |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1003 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1004 $ hg -R main push other -r e7ec4e813ba6 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1005 pushing to other |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1006 searching for changes |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1007 abort: missing support for 'test:unknown' |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1008 [255] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1009 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1010 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1011 pushing to ssh://user@dummy/other |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1012 searching for changes |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1013 abort: missing support for "'test:unknown'" |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1014 [255] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1015 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1016 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1017 pushing to http://localhost:$HGPORT2/ |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1018 searching for changes |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1019 abort: missing support for "'test:unknown'" |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
1020 [255] |
21186
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1021 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1022 Doing the actual push: race |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1023 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1024 $ cat << EOF >> $HGRCPATH |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1025 > [failpush] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1026 > reason = race |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1027 > EOF |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1028 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1029 $ hg -R main push other -r e7ec4e813ba6 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1030 pushing to other |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1031 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1032 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1033 'repository changed while pushing - please try again' |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1034 [255] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1035 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1036 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1037 pushing to ssh://user@dummy/other |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1038 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1039 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1040 'repository changed while pushing - please try again' |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1041 [255] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1042 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1043 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1044 pushing to http://localhost:$HGPORT2/ |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1045 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1046 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1047 'repository changed while pushing - please try again' |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
1048 [255] |
21187
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1049 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1050 Doing the actual push: hook abort |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1051 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1052 $ cat << EOF >> $HGRCPATH |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1053 > [failpush] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1054 > reason = |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1055 > [hooks] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1056 > b2x-pretransactionclose.failpush = false |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1057 > EOF |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1058 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1059 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1060 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1061 $ cat other.pid >> $DAEMON_PIDS |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1062 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1063 $ hg -R main push other -r e7ec4e813ba6 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1064 pushing to other |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1065 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1066 transaction abort! |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1067 rollback completed |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1068 abort: b2x-pretransactionclose.failpush hook exited with status 1 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1069 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1070 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1071 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1072 pushing to ssh://user@dummy/other |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1073 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1074 abort: b2x-pretransactionclose.failpush hook exited with status 1 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1075 remote: transaction abort! |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1076 remote: rollback completed |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1077 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1078 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1079 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1080 pushing to http://localhost:$HGPORT2/ |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1081 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1082 abort: b2x-pretransactionclose.failpush hook exited with status 1 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1083 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1084 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
1085 |