annotate tests/test-exchange-C4.t @ 882:48804a8d7472

simple4server: option to advertise obsolescence support We had an option to control the advertising of the obsolescence markers support from the server. The goal of this option is to allow large scale repo hosting service to control the use of obsolescence markers exchange.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 12 Mar 2014 12:44:33 -0700
parents d11446392c1d
children b177fde040dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3 Initial setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 $ . $TESTDIR/_exc-util.sh
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 === C.4 multiple successors, one is pruned ===
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 .. Another case were prune are confusing? (A is killed without its successors being
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 .. pushed)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. (could split of divergence, if split see the Z section)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. {{{
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 .. A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 .. B ○⇢ø⇠⊗ C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 .. \|/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 .. ● O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 .. }}}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. Marker exist from:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 .. * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 .. * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 .. * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 .. Command run:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 .. * hg push -r O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 .. Expected exchange:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 .. * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 .. * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 .. Expected exclude:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 .. * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 Implemented as the non-split version
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 $ setuprepos C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 creating test repo for test case C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45 - pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 - main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47 - pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 cd into `main` and proceed with env setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 $ cd main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 $ mkcommit A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 $ mkcommit B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ mkcommit C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 invalid branchheads cache (served): tip differs
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 $ hg prune -qd '0 0' .
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 $ hg log -G --hidden
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 x 7f7f229b13a6 (draft): C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 |
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 | o 35b183996678 (draft): B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 | x f5bc6836db60 (draft): A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 @ a9bdc8b26820 (public): O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 $ hg debugobsolete
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 Actual Test
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 -------------------------------------
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 $ dotest C.4 O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 ## Running testcase C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 # testing echange of "O" (a9bdc8b26820)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 ## initial state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 # obstore: main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 ## pushing "O" from main to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 pushing to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 searching for changes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 OBSEXC: computing relevant nodes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 OBSEXC: computing markers relevant to 1 nodes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 OBSEXC: encoding 2 markers
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 OBSEXC: sending 1 pushkey payload (188 bytes)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 ## post push state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 # obstore: main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 ## pulling "a9bdc8b26820" from main into pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 pulling from main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
110 no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
111 OBSEXC: pull obsolescence markers
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 OBSEXC: merging obsolescence markers (150 bytes)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 OBSEXC: 2 markers added
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 ## post pull state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
116 # obstore: main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
119 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120 # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
121 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
125 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
126