Show More
@@ -0,0 +1,295 b'' | |||||
|
1 | ============================================ | |||
|
2 | Testing obsolescence markers push: Cases A.1 | |||
|
3 | ============================================ | |||
|
4 | ||||
|
5 | Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of | |||
|
6 | all changesets that requested to be "in sync" after the push (even if they are | |||
|
7 | already on both side). | |||
|
8 | ||||
|
9 | This test belongs to a series of tests checking such set is properly computed | |||
|
10 | and applied. This does not tests "obsmarkers" discovery capabilities. | |||
|
11 | ||||
|
12 | Category A: simple cases | |||
|
13 | TestCase 1: pushing a single head | |||
|
14 | Subcases: | |||
|
15 | # A.1.1 pushing a single head (2 variants) | |||
|
16 | # A.1.2 pushing multiple changesets into a single head (2 variants) | |||
|
17 | ||||
|
18 | Case: A.1.1 pushing a single head | |||
|
19 | ================================= | |||
|
20 | .. | |||
|
21 | .. {{{ | |||
|
22 | .. β β A | |||
|
23 | .. | | |||
|
24 | .. β O | |||
|
25 | .. }}} | |||
|
26 | .. | |||
|
27 | .. Marker exists from: | |||
|
28 | .. | |||
|
29 | .. * A | |||
|
30 | .. | |||
|
31 | .. Commands run: | |||
|
32 | .. | |||
|
33 | .. * hg push -r A | |||
|
34 | .. * hg push | |||
|
35 | .. | |||
|
36 | .. Expected exchange: | |||
|
37 | .. | |||
|
38 | .. * chain from A | |||
|
39 | ||||
|
40 | Setup | |||
|
41 | ----- | |||
|
42 | ||||
|
43 | $ . $TESTDIR/testlib/exchange-obsmarker-util.sh | |||
|
44 | ||||
|
45 | initial | |||
|
46 | ||||
|
47 | $ setuprepos A.1.1 | |||
|
48 | creating test repo for test case A.1.1 | |||
|
49 | - pulldest | |||
|
50 | - main | |||
|
51 | - pushdest | |||
|
52 | cd into `main` and proceed with env setup | |||
|
53 | $ cd main | |||
|
54 | $ mkcommit A | |||
|
55 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` | |||
|
56 | $ hg log -G | |||
|
57 | @ f5bc6836db60 (draft): A | |||
|
58 | | | |||
|
59 | o a9bdc8b26820 (public): O | |||
|
60 | ||||
|
61 | $ inspect_obsmarkers | |||
|
62 | obsstore content | |||
|
63 | ================ | |||
|
64 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
65 | $ cd .. | |||
|
66 | $ cd .. | |||
|
67 | ||||
|
68 | setup both variants | |||
|
69 | ||||
|
70 | $ cp -R A.1.1 A.1.1.a | |||
|
71 | $ cp -R A.1.1 A.1.1.b | |||
|
72 | ||||
|
73 | Variant a: push -r A | |||
|
74 | -------------------- | |||
|
75 | ||||
|
76 | $ dotest A.1.1.a A | |||
|
77 | ## Running testcase A.1.1.a | |||
|
78 | # testing echange of "A" (f5bc6836db60) | |||
|
79 | ## initial state | |||
|
80 | # obstore: main | |||
|
81 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
82 | # obstore: pushdest | |||
|
83 | # obstore: pulldest | |||
|
84 | ## pushing "A" from main to pushdest | |||
|
85 | pushing to pushdest | |||
|
86 | searching for changes | |||
|
87 | remote: adding changesets | |||
|
88 | remote: adding manifests | |||
|
89 | remote: adding file changes | |||
|
90 | remote: added 1 changesets with 1 changes to 1 files | |||
|
91 | remote: 1 new obsolescence markers | |||
|
92 | ## post push state | |||
|
93 | # obstore: main | |||
|
94 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
95 | # obstore: pushdest | |||
|
96 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
97 | # obstore: pulldest | |||
|
98 | ## pulling "f5bc6836db60" from main into pulldest | |||
|
99 | pulling from main | |||
|
100 | searching for changes | |||
|
101 | adding changesets | |||
|
102 | adding manifests | |||
|
103 | adding file changes | |||
|
104 | added 1 changesets with 1 changes to 1 files | |||
|
105 | 1 new obsolescence markers | |||
|
106 | (run 'hg update' to get a working copy) | |||
|
107 | ## post pull state | |||
|
108 | # obstore: main | |||
|
109 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
110 | # obstore: pushdest | |||
|
111 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
112 | # obstore: pulldest | |||
|
113 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
114 | ||||
|
115 | Variant b: push | |||
|
116 | --------------- | |||
|
117 | ||||
|
118 | $ dotest A.1.1.b | |||
|
119 | ## Running testcase A.1.1.b | |||
|
120 | ## initial state | |||
|
121 | # obstore: main | |||
|
122 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
123 | # obstore: pushdest | |||
|
124 | # obstore: pulldest | |||
|
125 | ## pushing from main to pushdest | |||
|
126 | pushing to pushdest | |||
|
127 | searching for changes | |||
|
128 | remote: adding changesets | |||
|
129 | remote: adding manifests | |||
|
130 | remote: adding file changes | |||
|
131 | remote: added 1 changesets with 1 changes to 1 files | |||
|
132 | remote: 1 new obsolescence markers | |||
|
133 | ## post push state | |||
|
134 | # obstore: main | |||
|
135 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
136 | # obstore: pushdest | |||
|
137 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
138 | # obstore: pulldest | |||
|
139 | ## pulling from main into pulldest | |||
|
140 | pulling from main | |||
|
141 | searching for changes | |||
|
142 | adding changesets | |||
|
143 | adding manifests | |||
|
144 | adding file changes | |||
|
145 | added 1 changesets with 1 changes to 1 files | |||
|
146 | 1 new obsolescence markers | |||
|
147 | (run 'hg update' to get a working copy) | |||
|
148 | ## post pull state | |||
|
149 | # obstore: main | |||
|
150 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
151 | # obstore: pushdest | |||
|
152 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
153 | # obstore: pulldest | |||
|
154 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
155 | ||||
|
156 | A.1.2 pushing multiple changesets into a single head | |||
|
157 | ==================================================== | |||
|
158 | ||||
|
159 | .. {{{ | |||
|
160 | .. β B | |||
|
161 | .. | | |||
|
162 | .. β β A | |||
|
163 | .. | | |||
|
164 | .. β O | |||
|
165 | .. }}} | |||
|
166 | .. | |||
|
167 | .. Marker exist from: | |||
|
168 | .. | |||
|
169 | .. * A | |||
|
170 | .. | |||
|
171 | .. Command run: | |||
|
172 | .. | |||
|
173 | .. * hg push -r B | |||
|
174 | .. * hg push | |||
|
175 | .. | |||
|
176 | .. Expected exchange: | |||
|
177 | .. | |||
|
178 | .. * chain from A | |||
|
179 | ||||
|
180 | Setup | |||
|
181 | ----- | |||
|
182 | ||||
|
183 | initial | |||
|
184 | ||||
|
185 | $ setuprepos A.1.2 | |||
|
186 | creating test repo for test case A.1.2 | |||
|
187 | - pulldest | |||
|
188 | - main | |||
|
189 | - pushdest | |||
|
190 | cd into `main` and proceed with env setup | |||
|
191 | $ cd main | |||
|
192 | $ mkcommit A | |||
|
193 | $ mkcommit B | |||
|
194 | $ hg log -G | |||
|
195 | @ f6fbb35d8ac9 (draft): B | |||
|
196 | | | |||
|
197 | o f5bc6836db60 (draft): A | |||
|
198 | | | |||
|
199 | o a9bdc8b26820 (public): O | |||
|
200 | ||||
|
201 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` | |||
|
202 | $ inspect_obsmarkers | |||
|
203 | obsstore content | |||
|
204 | ================ | |||
|
205 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
206 | $ cd .. | |||
|
207 | $ cd .. | |||
|
208 | ||||
|
209 | setup both variants | |||
|
210 | ||||
|
211 | $ cp -R A.1.2 A.1.2.a | |||
|
212 | $ cp -R A.1.2 A.1.2.b | |||
|
213 | ||||
|
214 | Variant a: push -r A | |||
|
215 | -------------------- | |||
|
216 | ||||
|
217 | $ dotest A.1.2.a B | |||
|
218 | ## Running testcase A.1.2.a | |||
|
219 | # testing echange of "B" (f6fbb35d8ac9) | |||
|
220 | ## initial state | |||
|
221 | # obstore: main | |||
|
222 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
223 | # obstore: pushdest | |||
|
224 | # obstore: pulldest | |||
|
225 | ## pushing "B" from main to pushdest | |||
|
226 | pushing to pushdest | |||
|
227 | searching for changes | |||
|
228 | remote: adding changesets | |||
|
229 | remote: adding manifests | |||
|
230 | remote: adding file changes | |||
|
231 | remote: added 2 changesets with 2 changes to 2 files | |||
|
232 | remote: 1 new obsolescence markers | |||
|
233 | ## post push state | |||
|
234 | # obstore: main | |||
|
235 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
236 | # obstore: pushdest | |||
|
237 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
238 | # obstore: pulldest | |||
|
239 | ## pulling "f6fbb35d8ac9" from main into pulldest | |||
|
240 | pulling from main | |||
|
241 | searching for changes | |||
|
242 | adding changesets | |||
|
243 | adding manifests | |||
|
244 | adding file changes | |||
|
245 | added 2 changesets with 2 changes to 2 files | |||
|
246 | 1 new obsolescence markers | |||
|
247 | (run 'hg update' to get a working copy) | |||
|
248 | ## post pull state | |||
|
249 | # obstore: main | |||
|
250 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
251 | # obstore: pushdest | |||
|
252 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
253 | # obstore: pulldest | |||
|
254 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
255 | ||||
|
256 | Variant b: push | |||
|
257 | --------------- | |||
|
258 | ||||
|
259 | $ dotest A.1.2.b | |||
|
260 | ## Running testcase A.1.2.b | |||
|
261 | ## initial state | |||
|
262 | # obstore: main | |||
|
263 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
264 | # obstore: pushdest | |||
|
265 | # obstore: pulldest | |||
|
266 | ## pushing from main to pushdest | |||
|
267 | pushing to pushdest | |||
|
268 | searching for changes | |||
|
269 | remote: adding changesets | |||
|
270 | remote: adding manifests | |||
|
271 | remote: adding file changes | |||
|
272 | remote: added 2 changesets with 2 changes to 2 files | |||
|
273 | remote: 1 new obsolescence markers | |||
|
274 | ## post push state | |||
|
275 | # obstore: main | |||
|
276 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
277 | # obstore: pushdest | |||
|
278 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
279 | # obstore: pulldest | |||
|
280 | ## pulling from main into pulldest | |||
|
281 | pulling from main | |||
|
282 | searching for changes | |||
|
283 | adding changesets | |||
|
284 | adding manifests | |||
|
285 | adding file changes | |||
|
286 | added 2 changesets with 2 changes to 2 files | |||
|
287 | 1 new obsolescence markers | |||
|
288 | (run 'hg update' to get a working copy) | |||
|
289 | ## post pull state | |||
|
290 | # obstore: main | |||
|
291 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
292 | # obstore: pushdest | |||
|
293 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |||
|
294 | # obstore: pulldest | |||
|
295 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
General Comments 0
You need to be logged in to leave comments.
Login now