Mercurial > hg
annotate tests/test-bundle2-exchange.t @ 22971:3fe571c74b27
changegroup: store source and url in the `hookargs` dict
We store the source and url of the current data into `transaction.hookargs` this
let us inherit it from upper layers that may have created a much wider
transaction. We have to modify bundle2 at the same time to register the source
and url in the transaction. We have to do it in the same patch otherwise, the
`addchangegroup` call would fill these values and the hook calling will crash
because of the duplicated 'source' and 'url' arguments passed to the hook call.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 14 Oct 2014 00:06:46 -0700 |
parents | 7c13c9404c2c |
children | 44b16b59b80a |
rev | line source |
---|---|
22660
978cce51cc5f
bundle2: split test in two
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22659
diff
changeset
|
1 Test exchange of common information using bundle2 |
978cce51cc5f
bundle2: split test in two
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22659
diff
changeset
|
2 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
3 |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
4 $ getmainid() { |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
5 > hg -R main log --template '{node}\n' --rev "$1" |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
6 > } |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 |
22660
978cce51cc5f
bundle2: split test in two
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22659
diff
changeset
|
8 enable obsolescence |
20801
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 $ cat >> $HGRCPATH << EOF |
21147
2a246e737f92
bundle2: move bundle2 config option to section "experimental"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21146
diff
changeset
|
11 > [experimental] |
22955
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
22941
diff
changeset
|
12 > evolution=createmarkers,exchange |
21147
2a246e737f92
bundle2: move bundle2 config option to section "experimental"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21146
diff
changeset
|
13 > 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
|
14 > [ui] |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
15 > ssh=python "$TESTDIR/dummyssh" |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
16 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
17 > [web] |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
18 > push_ssl = false |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
19 > allow_push = * |
21648
c26a11cdafeb
bundle2: use non-publishing repo in test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21647
diff
changeset
|
20 > [phases] |
c26a11cdafeb
bundle2: use non-publishing repo in test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21647
diff
changeset
|
21 > publish=False |
22938
4f2222f86612
test-bundle2: test that we got appropriate hook called with appropriate data
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22660
diff
changeset
|
22 > [hooks] |
22957
11855ba3904c
test-bundle2-exchange: do not drop HG_NODE from the hook output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22955
diff
changeset
|
23 > changegroup = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" changegroup" |
11855ba3904c
test-bundle2-exchange: do not drop HG_NODE from the hook output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22955
diff
changeset
|
24 > b2x-transactionclose = sh -c "HG_LOCAL= python \"$TESTDIR/printenv.py\" b2x-transactionclose" |
20801
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
25 > EOF |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
26 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 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
|
28 |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 $ hg init main |
9c5183cb9bca
bundle2: very first version of a bundle2 bundler
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
30 $ 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
|
31 $ touch a |
88db3e615319
bundle2: make sure the unbundler refuse non bundle2 stream
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20802
diff
changeset
|
32 $ 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
|
33 $ 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
|
34 |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
35 $ 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
|
36 adding changesets |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
37 adding manifests |
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
38 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
|
39 added 8 changesets with 7 changes to 7 files (+3 heads) |
22960
7c13c9404c2c
changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org>
parents:
22957
diff
changeset
|
40 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=unbundle HG_URL=bundle:*/rebase.hg (glob) |
20950
c7ceae0faf69
bundle2: first crude version of bundling changeset with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20949
diff
changeset
|
41 (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
|
42 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
43 $ cd .. |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
44 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
45 Real world exchange |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
46 ===================== |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
47 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
48 Add more obsolescence information |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
49 |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
50 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
51 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
52 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
53 clone --pull |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
54 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
55 $ hg -R main phase --public cd010b8cd998 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
56 $ 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
|
57 adding changesets |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
58 adding manifests |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
59 adding file changes |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
60 added 2 changesets with 2 changes to 2 files |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
61 1 new obsolescence markers |
22960
7c13c9404c2c
changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org>
parents:
22957
diff
changeset
|
62 changegroup hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_SOURCE=bundle2 HG_URL=bundle2 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
63 updating to branch default |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
64 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
|
65 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
66 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
67 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
68 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
69 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
70 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
71 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
72 |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
73 pull |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
74 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
75 $ hg -R main phase --public 9520eea781bc |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
76 $ 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
|
77 pulling from $TESTTMP/main (glob) |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
78 searching for changes |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
79 adding changesets |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
80 adding manifests |
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
81 adding file changes |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
82 added 1 changesets with 1 changes to 1 files (+1 heads) |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
83 1 new obsolescence markers |
22960
7c13c9404c2c
changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org>
parents:
22957
diff
changeset
|
84 changegroup hook: HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_SOURCE=bundle2 HG_URL=bundle2 |
20955
12f161f08d74
bundle2: allow pulling changegroups using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20952
diff
changeset
|
85 (run 'hg heads' to see heads, 'hg merge' to merge) |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
86 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
87 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
88 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
89 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
90 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
91 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
92 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
93 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
94 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
95 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
96 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
97 pull empty (with phase movement) |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
98 |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
99 $ hg -R main phase --public 24b6387c8c8c |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
100 $ hg -R other pull -r 24b6387c8c8c |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
101 pulling from $TESTTMP/main (glob) |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
102 no changes found |
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
103 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
104 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
105 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
106 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
107 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
108 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
109 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
110 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
111 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
112 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
113 |
21584
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
114 pull empty |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
115 |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
116 $ 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
|
117 pulling from $TESTTMP/main (glob) |
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
118 no changes found |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
119 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
120 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
121 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
122 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
123 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
124 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
125 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
126 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
127 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
128 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21584
4dca1a06e7ee
bundle2: fix bundle2 pulling all revs on empty pulls
Durham Goode <durham@fb.com>
parents:
21547
diff
changeset
|
129 |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
130 add extra data to test their exchange during push |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
131 |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
132 $ hg -R main bookmark --rev eea13746799a book_eea1 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
133 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
134 $ hg -R main bookmark --rev 02de42196ebe book_02de |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
135 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
136 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
137 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
138 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
139 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
140 $ hg -R main bookmark --rev 32af7686d403 book_32af |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
141 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
142 |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
143 $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
144 $ hg -R other bookmark --rev cd010b8cd998 book_02de |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
145 $ hg -R other bookmark --rev cd010b8cd998 book_42cc |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
146 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
147 $ hg -R other bookmark --rev cd010b8cd998 book_32af |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
148 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
149 $ hg -R main phase --public eea13746799a |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
150 |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
151 push |
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
152 $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
21061
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
153 pushing to other |
62d35f251c60
bundle2: allow using bundle2 for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21019
diff
changeset
|
154 searching for changes |
22957
11855ba3904c
test-bundle2-exchange: do not drop HG_NODE from the hook output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22955
diff
changeset
|
155 b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_URL=push |
22971
3fe571c74b27
changegroup: store source and url in the `hookargs` dict
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22960
diff
changeset
|
156 changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_SOURCE=push HG_URL=push |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
157 remote: adding changesets |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
158 remote: adding manifests |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
159 remote: adding file changes |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
160 remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
22350
6d113cc7a31a
push: only push obsmarkers relevant to the "pushed subset"
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22347
diff
changeset
|
161 remote: 1 new obsolescence markers |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
162 updating bookmark book_eea1 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
163 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
164 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
165 |\ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
166 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
167 | | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
168 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
169 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
170 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
171 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
172 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
173 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
174 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
175 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
176 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
177 pull over ssh |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
178 |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
179 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
180 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
|
181 searching for changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
182 adding changesets |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
183 adding manifests |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
184 adding file changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
185 added 1 changesets with 1 changes to 1 files (+1 heads) |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
186 1 new obsolescence markers |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
187 updating bookmark book_02de |
22960
7c13c9404c2c
changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org>
parents:
22957
diff
changeset
|
188 changegroup hook: HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_SOURCE=bundle2 HG_URL=bundle2 |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
189 (run 'hg heads' to see heads, 'hg merge' to merge) |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
190 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
191 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
192 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
193 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
194 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
195 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
196 pull over http |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
197 |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
198 $ 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
|
199 $ 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
|
200 |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
201 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
202 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
|
203 searching for changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
204 adding changesets |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
205 adding manifests |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
206 adding file changes |
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
207 added 1 changesets with 1 changes to 1 files (+1 heads) |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
208 1 new obsolescence markers |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
209 updating bookmark book_42cc |
22960
7c13c9404c2c
changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org>
parents:
22957
diff
changeset
|
210 changegroup hook: HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_SOURCE=bundle2 HG_URL=bundle2 |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
211 (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
|
212 $ cat main-error.log |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
213 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
214 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
215 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
216 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
217 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
218 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21069
0a9cae236738
bundle2: allow bundle2 for pulling over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21062
diff
changeset
|
219 |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
220 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
|
221 |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
222 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
223 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
|
224 searching for changes |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
225 remote: adding changesets |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
226 remote: adding manifests |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
227 remote: adding file changes |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
228 remote: added 1 changesets with 1 changes to 1 files |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
229 remote: 1 new obsolescence markers |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
230 updating bookmark book_5fdd |
22957
11855ba3904c
test-bundle2-exchange: do not drop HG_NODE from the hook output
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22955
diff
changeset
|
231 remote: b2x-transactionclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2-EXP=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
22971
3fe571c74b27
changegroup: store source and url in the `hookargs` dict
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22960
diff
changeset
|
232 remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
233 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
234 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
235 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
236 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
237 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
238 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
239 | | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
240 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
241 | |/| |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
242 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
243 |/ / |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
244 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
245 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
246 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
247 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
248 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
249 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
250 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
251 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
252 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
253 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
254 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
255 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
256 push over http |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
257 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
258 $ 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
|
259 $ 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
|
260 |
21649
3bfadd70550b
bundle2: add more phase movement in the test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21648
diff
changeset
|
261 $ hg -R main phase --public 32af7686d403 |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
262 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
263 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
|
264 searching for changes |
21131
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
265 remote: adding changesets |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
266 remote: adding manifests |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
267 remote: adding file changes |
b7435117d951
bundle2: capture remote stdout while unbundling
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21130
diff
changeset
|
268 remote: added 1 changesets with 1 changes to 1 files |
22354
a89add6c6b2f
bundle2: pull obsmarkers relevant to the pulled set through bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22350
diff
changeset
|
269 remote: 1 new obsolescence markers |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
270 updating bookmark book_32af |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
271 $ cat other-error.log |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
272 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
273 Check final content. |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
274 |
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
275 $ hg -R other log -G |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
276 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
277 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
278 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
279 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
280 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
281 | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
282 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
283 | | |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
284 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
21647
1a6909f4ebb0
bundle2: use a smarter template for test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21628
diff
changeset
|
285 | |/| |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
286 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
21647
1a6909f4ebb0
bundle2: use a smarter template for test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21628
diff
changeset
|
287 |/ / |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
288 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
21647
1a6909f4ebb0
bundle2: use a smarter template for test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21628
diff
changeset
|
289 |/ |
22241
3dc3cf8d0e73
test-bundle2: add bookmark movement to the push test
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22090
diff
changeset
|
290 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
21075
438803e4bd97
bundle2: support for push over the wire
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21069
diff
changeset
|
291 |
22323
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
292 $ hg -R other debugobsolete |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
293 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
294 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
295 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
296 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
297 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
298 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
b31d29b2a7f2
test-bundle2: add obsolescence information to be exchanged
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22241
diff
changeset
|
299 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
300 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
301 Error Handling |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
302 ============== |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
303 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
304 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
|
305 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
306 Setting up |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
307 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
308 $ cat > failpush.py << EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
309 > """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
|
310 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
311 > 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
|
312 > """ |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
313 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
314 > from mercurial import util |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
315 > from mercurial import bundle2 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
316 > from mercurial import exchange |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
317 > from mercurial import extensions |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
318 > |
21905
7923648ad915
bundle2-test: use the new way to extend push content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21649
diff
changeset
|
319 > def _pushbundle2failpart(pushop, bundler): |
21178
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
320 > 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
|
321 > part = None |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
322 > if reason == 'abort': |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
323 > bundler.newpart('test:abort') |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
324 > if reason == 'unknown': |
21600
5e08f3b65510
bundle2: update all ``addpart`` callers to ``newpart``
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21585
diff
changeset
|
325 > 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
|
326 > if reason == 'race': |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
327 > # 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
|
328 > 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
|
329 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
330 > @bundle2.parthandler("test:abort") |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
331 > def handleabort(op, part): |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
332 > 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
|
333 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
334 > def uisetup(ui): |
22017
7986e99bb69a
push: rework the bundle2partsgenerators logic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21964
diff
changeset
|
335 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart |
7986e99bb69a
push: rework the bundle2partsgenerators logic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21964
diff
changeset
|
336 > exchange.b2partsgenorder.insert(0, 'failpart') |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
337 > |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
338 > EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
339 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
340 $ cd main |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
341 $ hg up tip |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
342 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
|
343 $ echo 'I' > I |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
344 $ hg add I |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
345 $ hg ci -m 'I' |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
346 $ hg id |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
347 e7ec4e813ba6 tip |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
348 $ cd .. |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
349 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
350 $ cat << EOF >> $HGRCPATH |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
351 > [extensions] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
352 > failpush=$TESTTMP/failpush.py |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
353 > EOF |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
354 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
355 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
356 $ 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
|
357 $ cat other.pid >> $DAEMON_PIDS |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
358 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
359 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
|
360 |
21178
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
361 $ cat << EOF >> $HGRCPATH |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
362 > [failpush] |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
363 > reason = abort |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
364 > EOF |
9a813e703172
bundle2: make error testing more modular
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21177
diff
changeset
|
365 |
21177
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
366 $ 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
|
367 pushing to other |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
368 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
369 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
370 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
371 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
372 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
373 $ 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
|
374 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
|
375 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
376 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
377 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
378 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
379 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
380 $ 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
|
381 pushing to http://localhost:$HGPORT2/ |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
382 searching for changes |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
383 abort: Abandon ship! |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
384 (don't panic) |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
385 [255] |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
386 |
952af771bc17
bundle2: gracefully handle abort during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21147
diff
changeset
|
387 |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
388 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
|
389 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
390 $ cat << EOF >> $HGRCPATH |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
391 > [failpush] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
392 > reason = unknown |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
393 > EOF |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
394 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
395 $ 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
|
396 pushing to other |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
397 searching for changes |
21617
0cfda08afd24
bundle2: rename UnknownPartError to BundleValueError
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21605
diff
changeset
|
398 abort: missing support for test:unknown |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
399 [255] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
400 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
401 $ 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
|
402 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
|
403 searching for changes |
21617
0cfda08afd24
bundle2: rename UnknownPartError to BundleValueError
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21605
diff
changeset
|
404 abort: missing support for test:unknown |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
405 [255] |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
406 |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
407 $ 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
|
408 pushing to http://localhost:$HGPORT2/ |
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
409 searching for changes |
21617
0cfda08afd24
bundle2: rename UnknownPartError to BundleValueError
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21605
diff
changeset
|
410 abort: missing support for test:unknown |
21183
4345274adc4b
bundle2: gracefully handle UnknownPartError during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21178
diff
changeset
|
411 [255] |
21186
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
412 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
413 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
|
414 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
415 $ cat << EOF >> $HGRCPATH |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
416 > [failpush] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
417 > reason = race |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
418 > EOF |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
419 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
420 $ 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
|
421 pushing to other |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
422 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
423 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
424 '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
|
425 [255] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
426 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
427 $ 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
|
428 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
|
429 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
430 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
431 '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
|
432 [255] |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
433 |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
434 $ 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
|
435 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
|
436 searching for changes |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
437 abort: push failed: |
9f3652e851f8
bundle2: gracefully handle PushRaced error during unbundle
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21185
diff
changeset
|
438 '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
|
439 [255] |
21187
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
440 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
441 Doing the actual push: hook abort |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
442 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
443 $ cat << EOF >> $HGRCPATH |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
444 > [failpush] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
445 > reason = |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
446 > [hooks] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
447 > b2x-pretransactionclose.failpush = false |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
448 > EOF |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
449 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
450 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
451 $ 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
|
452 $ cat other.pid >> $DAEMON_PIDS |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
453 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
454 $ 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
|
455 pushing to other |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
456 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
457 transaction abort! |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
458 rollback completed |
22971
3fe571c74b27
changegroup: store source and url in the `hookargs` dict
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22960
diff
changeset
|
459 changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=push HG_URL=push |
21187
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
460 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
|
461 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
462 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
463 $ 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
|
464 pushing to ssh://user@dummy/other |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
465 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
466 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
|
467 remote: transaction abort! |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
468 remote: rollback completed |
22971
3fe571c74b27
changegroup: store source and url in the `hookargs` dict
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22960
diff
changeset
|
469 remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
21187
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
470 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
471 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
472 $ 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
|
473 pushing to http://localhost:$HGPORT2/ |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
474 searching for changes |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
475 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
|
476 [255] |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
477 |
bcfd44abad93
bundle2: gracefully handle hook abort
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21186
diff
changeset
|
478 |