Mercurial > evolve
annotate tests/test-exchange-B6.t @ 957:2cde59f3cb5d
evolve: add a push pass using bundle2
Instead of using a dedicated wireprotocol commands, we use bundle2 to transmit
an obs marker parts. This aims at both testing bundle2 more and to limit the
amount of special code we needs to put in simple for server to fit our needs.
The massive test changes comes from the fact we can use this fast path for both
remote and local push.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 20 May 2014 13:41:27 -0700 |
parents | b107f3549ec2 |
children | bddee73b361e |
rev | line source |
---|---|
842
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 Initial setup |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 $ . $TESTDIR/_exc-util.sh |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 == B.6 Pruned changeset with ancestors not in pushed set === |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 .. {{{ |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 .. B ø⇠⊗ B' |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 .. | | |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
14 .. A ○ | |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
15 .. |/ |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
16 .. ● O |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 .. }}} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 .. Marker exist from: |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
20 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
21 .. * `Bø⇠⊗ B'` |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
22 .. * B' prune |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
23 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
24 .. Command run: |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
25 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
26 .. * hg push -r O |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
27 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
28 .. Expected exchange: |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
29 .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
30 .. * `Bø⇠⊗ B'` |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
31 .. * B' prune |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
32 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
33 $ setuprepos B.6 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
34 creating test repo for test case B.6 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
35 - pulldest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
36 - main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
37 - pushdest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
38 cd into `main` and proceed with env setup |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
39 $ cd main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
40 $ mkcommit A |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
41 $ mkcommit B0 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
42 $ hg up --quiet 0 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
43 $ mkcommit B1 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
44 created new head |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
45 $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
46 $ hg prune -qd '0 0' . |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
47 $ hg log -G --hidden |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
48 x f6298a8ac3a4 (draft): B1 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
49 | |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
50 | x 962ecf6b1afc (draft): B0 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
51 | | |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
52 | o f5bc6836db60 (draft): A |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
53 |/ |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
54 @ a9bdc8b26820 (public): O |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
55 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
56 $ hg debugobsolete |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
57 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
58 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
59 $ cd .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
60 $ cd .. |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
61 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
62 Actual Test |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
63 ------------------------------------- |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
64 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
65 $ dotest B.6 O |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
66 ## Running testcase B.6 |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
67 # testing echange of "O" (a9bdc8b26820) |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
68 ## initial state |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
69 # obstore: main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
70 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
71 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
72 # obstore: pushdest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
73 # obstore: pulldest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
74 ## pushing "O" from main to pushdest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
75 pushing to pushdest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
76 searching for changes |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
77 no changes found |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
78 OBSEXC: computing relevant nodes |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
79 OBSEXC: computing markers relevant to 1 nodes |
957
2cde59f3cb5d
evolve: add a push pass using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
956
diff
changeset
|
80 OBSEXC: pushing 2 markers (150 bytes) |
842
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
81 OBSEXC: DONE |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
82 ## post push state |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
83 # obstore: main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
84 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
85 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
86 # obstore: pushdest |
905
b177fde040dd
exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
842
diff
changeset
|
87 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
842
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
88 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
89 # obstore: pulldest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
90 ## pulling "a9bdc8b26820" from main into pulldest |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
91 pulling from main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
92 no changes found |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
93 OBSEXC: pull obsolescence markers |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
94 OBSEXC: merging obsolescence markers (150 bytes) |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
95 OBSEXC: 2 markers added |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
96 OBSEXC: DONE |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
97 ## post pull state |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
98 # obstore: main |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
99 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
100 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
101 # obstore: pushdest |
905
b177fde040dd
exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
842
diff
changeset
|
102 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
842
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
103 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
104 # obstore: pulldest |
905
b177fde040dd
exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
842
diff
changeset
|
105 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
842
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
106 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} |
9b9bb01b9286
exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
107 |