annotate tests/test-exchange-B2.t @ 844:45ca2d5f84be

exchange: add test case for C.1
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 03 Mar 2014 20:36:47 -0800
parents b4087501d6a5
children 010c7e4aa820
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2 Initial setup
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4 $ . $TESTDIR/_exc-util.sh
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6 === B.2 Pruned changeset on head. nothing pushed ===
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8 .. {{{
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 .. ⊗ A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 .. |
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 .. ● O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. }}}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. Marker exist from:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 .. * A (prune)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 .. Command run:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 .. * hg push -r O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. * hg push
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 .. Expected exchange:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 .. * prune marker for A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 $ setuprepos B.2
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 creating test repo for test case B.2
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 - pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 - main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 - pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 cd into `main` and proceed with env setup
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 $ cd main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 $ mkcommit A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 $ hg prune -qd '0 0' .
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 $ hg log -G --hidden
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 x f5bc6836db60 (draft): A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 |
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 @ a9bdc8b26820 (public): O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 $ hg debugobsolete
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 $ cd ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45 $ cd ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 $ cp -r B.2 B.2.a
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 $ cp -r B.2 B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 Actual Test (explicite push version)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 -----------------------------------
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ dotest B.2.a O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 ## Running testcase B.2.a
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 # testing echange of "O" (a9bdc8b26820)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 ## initial state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 ## pushing "O" from main to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 pushing to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 searching for changes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 no changes found
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 OBSEXC: computing relevant nodes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 OBSEXC: computing markers relevant to 1 nodes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 OBSEXC: encoding 1 markers
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 OBSEXC: sending 1 pushkey payload (112 bytes)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 OBSEXC: DONE
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 ## post push state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 ## pulling "a9bdc8b26820" from main into pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 pulling from main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 no changes found
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 OBSEXC: pull obsolescence markers
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 OBSEXC: merging obsolescence markers (89 bytes)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 OBSEXC: 1 markers added
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 OBSEXC: DONE
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 ## post pull state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 Actual Test (bare push version)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 -----------------------------------
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 $ dotest B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 ## Running testcase B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 ## initial state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 ## pushing from main to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 pushing to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 searching for changes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 no changes found
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 OBSEXC: computing relevant nodes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 OBSEXC: computing markers relevant to 1 nodes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 OBSEXC: encoding 1 markers
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 OBSEXC: sending 1 pushkey payload (112 bytes)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
110 OBSEXC: DONE
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
111 ## post push state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
116 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 ## pulling from main into pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 pulling from main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
119 searching for changes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120 no changes found
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
121 OBSEXC: pull obsolescence markers
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 OBSEXC: merging obsolescence markers (89 bytes)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123 OBSEXC: 1 markers added
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124 OBSEXC: DONE
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
125 ## post pull state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
126 # obstore: main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
127 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
128 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
129 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
130 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
131 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}