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