Show More
@@ -1,751 +1,756 b'' | |||
|
1 | 1 | Test file dedicated to testing the divergent troubles from obsolete changeset. |
|
2 | 2 | |
|
3 | 3 | This is the most complex troubles from far so we isolate it in a dedicated |
|
4 | 4 | file. |
|
5 | 5 | |
|
6 | 6 | Enable obsolete |
|
7 | 7 | |
|
8 | 8 | $ cat >> $HGRCPATH << EOF |
|
9 | 9 | > [ui] |
|
10 | 10 | > logtemplate = {rev}:{node|short} {desc}{if(obsfate, " [{join(obsfate, "; ")}]")}\n |
|
11 | 11 | > [experimental] |
|
12 | 12 | > evolution.createmarkers=True |
|
13 | 13 | > [extensions] |
|
14 | 14 | > drawdag=$TESTDIR/drawdag.py |
|
15 | 15 | > [alias] |
|
16 | 16 | > debugobsolete = debugobsolete -d '0 0' |
|
17 | 17 | > [phases] |
|
18 | 18 | > publish=False |
|
19 | > [templates] | |
|
20 | > wuentryshort = '{instability}:{divergentnodes} {reason} {node|shortest}\n' | |
|
21 | > whyunstableshort = '{whyunstable % wuentryshort}' | |
|
22 | > wuentryshorter = '{instability}:{divergentnodes % " {node|shortest} ({phase})"} {reason} {node|shortest}\n' | |
|
23 | > whyunstableshorter = '{whyunstable % wuentryshorter}' | |
|
19 | 24 | > EOF |
|
20 | 25 | |
|
21 | 26 | |
|
22 | 27 | $ mkcommit() { |
|
23 | 28 | > echo "$1" > "$1" |
|
24 | 29 | > hg add "$1" |
|
25 | 30 | > hg ci -m "$1" |
|
26 | 31 | > } |
|
27 | 32 | $ getid() { |
|
28 | 33 | > hg log --hidden -r "desc('$1')" -T '{node}\n' |
|
29 | 34 | > } |
|
30 | 35 | |
|
31 | 36 | setup repo |
|
32 | 37 | |
|
33 | 38 | $ hg init reference |
|
34 | 39 | $ cd reference |
|
35 | 40 | $ mkcommit base |
|
36 | 41 | $ mkcommit A_0 |
|
37 | 42 | $ hg up 0 |
|
38 | 43 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
39 | 44 | $ mkcommit A_1 |
|
40 | 45 | created new head |
|
41 | 46 | $ hg up 0 |
|
42 | 47 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
43 | 48 | $ mkcommit A_2 |
|
44 | 49 | created new head |
|
45 | 50 | $ hg up 0 |
|
46 | 51 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
47 | 52 | $ cd .. |
|
48 | 53 | |
|
49 | 54 | |
|
50 | 55 | $ newcase() { |
|
51 | 56 | > hg clone -u 0 -q reference $1 |
|
52 | 57 | > cd $1 |
|
53 | 58 | > } |
|
54 | 59 | |
|
55 | 60 | direct divergence |
|
56 | 61 | ----------------- |
|
57 | 62 | |
|
58 | 63 | A_1 have two direct and divergent successors A_1 and A_1 |
|
59 | 64 | |
|
60 | 65 | $ newcase direct |
|
61 | 66 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
62 | 67 | obsoleted 1 changesets |
|
63 | 68 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
64 | 69 | 2 new content-divergent changesets |
|
65 | 70 | $ hg log -G --hidden |
|
66 | 71 | * 3:392fd25390da A_2 |
|
67 | 72 | | |
|
68 | 73 | | * 2:82623d38b9ba A_1 |
|
69 | 74 | |/ |
|
70 | 75 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] |
|
71 | 76 | |/ |
|
72 | 77 | @ 0:d20a80d4def3 base |
|
73 | 78 | |
|
74 | 79 | $ hg debugsuccessorssets --hidden 'all()' |
|
75 | 80 | d20a80d4def3 |
|
76 | 81 | d20a80d4def3 |
|
77 | 82 | 007dc284c1f8 |
|
78 | 83 | 82623d38b9ba |
|
79 | 84 | 392fd25390da |
|
80 | 85 | 82623d38b9ba |
|
81 | 86 | 82623d38b9ba |
|
82 | 87 | 392fd25390da |
|
83 | 88 | 392fd25390da |
|
84 | 89 | $ hg log -r 'contentdivergent()' |
|
85 | 90 | 2:82623d38b9ba A_1 |
|
86 | 91 | 3:392fd25390da A_2 |
|
87 | 92 | $ hg debugsuccessorssets 'all()' --closest |
|
88 | 93 | d20a80d4def3 |
|
89 | 94 | d20a80d4def3 |
|
90 | 95 | 82623d38b9ba |
|
91 | 96 | 82623d38b9ba |
|
92 | 97 | 392fd25390da |
|
93 | 98 | 392fd25390da |
|
94 | 99 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
95 | 100 | d20a80d4def3 |
|
96 | 101 | d20a80d4def3 |
|
97 | 102 | 007dc284c1f8 |
|
98 | 103 | 82623d38b9ba |
|
99 | 104 | 392fd25390da |
|
100 | 105 | 82623d38b9ba |
|
101 | 106 | 82623d38b9ba |
|
102 | 107 | 392fd25390da |
|
103 | 108 | 392fd25390da |
|
104 | 109 | |
|
105 | 110 | check that mercurial refuse to push |
|
106 | 111 | |
|
107 | 112 | $ hg init ../other |
|
108 | 113 | $ hg push ../other |
|
109 | 114 | pushing to ../other |
|
110 | 115 | searching for changes |
|
111 | 116 | abort: push includes content-divergent changeset: 392fd25390da! |
|
112 | 117 | [255] |
|
113 | 118 | |
|
114 | 119 | $ cd .. |
|
115 | 120 | |
|
116 | 121 | |
|
117 | 122 | indirect divergence with known changeset |
|
118 | 123 | ------------------------------------------- |
|
119 | 124 | |
|
120 | 125 | $ newcase indirect_known |
|
121 | 126 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
122 | 127 | obsoleted 1 changesets |
|
123 | 128 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
124 | 129 | 2 new content-divergent changesets |
|
125 | 130 | $ mkcommit A_3 |
|
126 | 131 | created new head |
|
127 | 132 | $ hg debugobsolete `getid A_2` `getid A_3` |
|
128 | 133 | obsoleted 1 changesets |
|
129 | 134 | $ hg log -G --hidden |
|
130 | 135 | @ 4:01f36c5a8fda A_3 |
|
131 | 136 | | |
|
132 | 137 | | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda] |
|
133 | 138 | |/ |
|
134 | 139 | | * 2:82623d38b9ba A_1 |
|
135 | 140 | |/ |
|
136 | 141 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] |
|
137 | 142 | |/ |
|
138 | 143 | o 0:d20a80d4def3 base |
|
139 | 144 | |
|
140 | 145 | $ hg debugsuccessorssets --hidden 'all()' |
|
141 | 146 | d20a80d4def3 |
|
142 | 147 | d20a80d4def3 |
|
143 | 148 | 007dc284c1f8 |
|
144 | 149 | 82623d38b9ba |
|
145 | 150 | 01f36c5a8fda |
|
146 | 151 | 82623d38b9ba |
|
147 | 152 | 82623d38b9ba |
|
148 | 153 | 392fd25390da |
|
149 | 154 | 01f36c5a8fda |
|
150 | 155 | 01f36c5a8fda |
|
151 | 156 | 01f36c5a8fda |
|
152 | 157 | $ hg log -r 'contentdivergent()' |
|
153 | 158 | 2:82623d38b9ba A_1 |
|
154 | 159 | 4:01f36c5a8fda A_3 |
|
155 | 160 | $ hg debugsuccessorssets 'all()' --closest |
|
156 | 161 | d20a80d4def3 |
|
157 | 162 | d20a80d4def3 |
|
158 | 163 | 82623d38b9ba |
|
159 | 164 | 82623d38b9ba |
|
160 | 165 | 01f36c5a8fda |
|
161 | 166 | 01f36c5a8fda |
|
162 | 167 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
163 | 168 | d20a80d4def3 |
|
164 | 169 | d20a80d4def3 |
|
165 | 170 | 007dc284c1f8 |
|
166 | 171 | 82623d38b9ba |
|
167 | 172 | 392fd25390da |
|
168 | 173 | 82623d38b9ba |
|
169 | 174 | 82623d38b9ba |
|
170 | 175 | 392fd25390da |
|
171 | 176 | 392fd25390da |
|
172 | 177 | 01f36c5a8fda |
|
173 | 178 | 01f36c5a8fda |
|
174 | 179 | $ cd .. |
|
175 | 180 | |
|
176 | 181 | |
|
177 | 182 | indirect divergence with known changeset |
|
178 | 183 | ------------------------------------------- |
|
179 | 184 | |
|
180 | 185 | $ newcase indirect_unknown |
|
181 | 186 | $ hg debugobsolete `getid A_0` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
|
182 | 187 | obsoleted 1 changesets |
|
183 | 188 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid A_1` |
|
184 | 189 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
185 | 190 | 2 new content-divergent changesets |
|
186 | 191 | $ hg log -G --hidden |
|
187 | 192 | * 3:392fd25390da A_2 |
|
188 | 193 | | |
|
189 | 194 | | * 2:82623d38b9ba A_1 |
|
190 | 195 | |/ |
|
191 | 196 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] |
|
192 | 197 | |/ |
|
193 | 198 | @ 0:d20a80d4def3 base |
|
194 | 199 | |
|
195 | 200 | $ hg debugsuccessorssets --hidden 'all()' |
|
196 | 201 | d20a80d4def3 |
|
197 | 202 | d20a80d4def3 |
|
198 | 203 | 007dc284c1f8 |
|
199 | 204 | 82623d38b9ba |
|
200 | 205 | 392fd25390da |
|
201 | 206 | 82623d38b9ba |
|
202 | 207 | 82623d38b9ba |
|
203 | 208 | 392fd25390da |
|
204 | 209 | 392fd25390da |
|
205 | 210 | $ hg log -r 'contentdivergent()' |
|
206 | 211 | 2:82623d38b9ba A_1 |
|
207 | 212 | 3:392fd25390da A_2 |
|
208 | 213 | $ hg debugsuccessorssets 'all()' --closest |
|
209 | 214 | d20a80d4def3 |
|
210 | 215 | d20a80d4def3 |
|
211 | 216 | 82623d38b9ba |
|
212 | 217 | 82623d38b9ba |
|
213 | 218 | 392fd25390da |
|
214 | 219 | 392fd25390da |
|
215 | 220 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
216 | 221 | d20a80d4def3 |
|
217 | 222 | d20a80d4def3 |
|
218 | 223 | 007dc284c1f8 |
|
219 | 224 | 82623d38b9ba |
|
220 | 225 | 392fd25390da |
|
221 | 226 | 82623d38b9ba |
|
222 | 227 | 82623d38b9ba |
|
223 | 228 | 392fd25390da |
|
224 | 229 | 392fd25390da |
|
225 | 230 | $ cd .. |
|
226 | 231 | |
|
227 | 232 | do not take unknown node in account if they are final |
|
228 | 233 | ----------------------------------------------------- |
|
229 | 234 | |
|
230 | 235 | $ newcase final-unknown |
|
231 | 236 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
232 | 237 | obsoleted 1 changesets |
|
233 | 238 | $ hg debugobsolete `getid A_1` `getid A_2` |
|
234 | 239 | obsoleted 1 changesets |
|
235 | 240 | $ hg debugobsolete `getid A_0` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
236 | 241 | $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccc |
|
237 | 242 | $ hg debugobsolete `getid A_1` dddddddddddddddddddddddddddddddddddddddd |
|
238 | 243 | |
|
239 | 244 | $ hg debugsuccessorssets --hidden 'desc('A_0')' |
|
240 | 245 | 007dc284c1f8 |
|
241 | 246 | 392fd25390da |
|
242 | 247 | $ hg debugsuccessorssets 'desc('A_0')' --closest |
|
243 | 248 | $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden |
|
244 | 249 | 007dc284c1f8 |
|
245 | 250 | 82623d38b9ba |
|
246 | 251 | |
|
247 | 252 | $ cd .. |
|
248 | 253 | |
|
249 | 254 | divergence that converge again is not divergence anymore |
|
250 | 255 | ----------------------------------------------------- |
|
251 | 256 | |
|
252 | 257 | $ newcase converged_divergence |
|
253 | 258 | $ hg debugobsolete `getid A_0` `getid A_1` |
|
254 | 259 | obsoleted 1 changesets |
|
255 | 260 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
256 | 261 | 2 new content-divergent changesets |
|
257 | 262 | $ mkcommit A_3 |
|
258 | 263 | created new head |
|
259 | 264 | $ hg debugobsolete `getid A_1` `getid A_3` |
|
260 | 265 | obsoleted 1 changesets |
|
261 | 266 | $ hg debugobsolete `getid A_2` `getid A_3` |
|
262 | 267 | obsoleted 1 changesets |
|
263 | 268 | $ hg log -G --hidden |
|
264 | 269 | @ 4:01f36c5a8fda A_3 |
|
265 | 270 | | |
|
266 | 271 | | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda] |
|
267 | 272 | |/ |
|
268 | 273 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] |
|
269 | 274 | |/ |
|
270 | 275 | | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da] |
|
271 | 276 | |/ |
|
272 | 277 | o 0:d20a80d4def3 base |
|
273 | 278 | |
|
274 | 279 | $ hg debugsuccessorssets --hidden 'all()' |
|
275 | 280 | d20a80d4def3 |
|
276 | 281 | d20a80d4def3 |
|
277 | 282 | 007dc284c1f8 |
|
278 | 283 | 01f36c5a8fda |
|
279 | 284 | 82623d38b9ba |
|
280 | 285 | 01f36c5a8fda |
|
281 | 286 | 392fd25390da |
|
282 | 287 | 01f36c5a8fda |
|
283 | 288 | 01f36c5a8fda |
|
284 | 289 | 01f36c5a8fda |
|
285 | 290 | $ hg log -r 'contentdivergent()' |
|
286 | 291 | $ hg debugsuccessorssets 'all()' --closest |
|
287 | 292 | d20a80d4def3 |
|
288 | 293 | d20a80d4def3 |
|
289 | 294 | 01f36c5a8fda |
|
290 | 295 | 01f36c5a8fda |
|
291 | 296 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
292 | 297 | d20a80d4def3 |
|
293 | 298 | d20a80d4def3 |
|
294 | 299 | 007dc284c1f8 |
|
295 | 300 | 82623d38b9ba |
|
296 | 301 | 392fd25390da |
|
297 | 302 | 82623d38b9ba |
|
298 | 303 | 82623d38b9ba |
|
299 | 304 | 392fd25390da |
|
300 | 305 | 392fd25390da |
|
301 | 306 | 01f36c5a8fda |
|
302 | 307 | 01f36c5a8fda |
|
303 | 308 | $ cd .. |
|
304 | 309 | |
|
305 | 310 | split is not divergences |
|
306 | 311 | ----------------------------- |
|
307 | 312 | |
|
308 | 313 | $ newcase split |
|
309 | 314 | $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2` |
|
310 | 315 | obsoleted 1 changesets |
|
311 | 316 | $ hg log -G --hidden |
|
312 | 317 | o 3:392fd25390da A_2 |
|
313 | 318 | | |
|
314 | 319 | | o 2:82623d38b9ba A_1 |
|
315 | 320 | |/ |
|
316 | 321 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] |
|
317 | 322 | |/ |
|
318 | 323 | @ 0:d20a80d4def3 base |
|
319 | 324 | |
|
320 | 325 | $ hg debugsuccessorssets --hidden 'all()' |
|
321 | 326 | d20a80d4def3 |
|
322 | 327 | d20a80d4def3 |
|
323 | 328 | 007dc284c1f8 |
|
324 | 329 | 82623d38b9ba 392fd25390da |
|
325 | 330 | 82623d38b9ba |
|
326 | 331 | 82623d38b9ba |
|
327 | 332 | 392fd25390da |
|
328 | 333 | 392fd25390da |
|
329 | 334 | $ hg log -r 'contentdivergent()' |
|
330 | 335 | $ hg debugsuccessorssets 'all()' --closest |
|
331 | 336 | d20a80d4def3 |
|
332 | 337 | d20a80d4def3 |
|
333 | 338 | 82623d38b9ba |
|
334 | 339 | 82623d38b9ba |
|
335 | 340 | 392fd25390da |
|
336 | 341 | 392fd25390da |
|
337 | 342 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
338 | 343 | d20a80d4def3 |
|
339 | 344 | d20a80d4def3 |
|
340 | 345 | 007dc284c1f8 |
|
341 | 346 | 82623d38b9ba 392fd25390da |
|
342 | 347 | 82623d38b9ba |
|
343 | 348 | 82623d38b9ba |
|
344 | 349 | 392fd25390da |
|
345 | 350 | 392fd25390da |
|
346 | 351 | |
|
347 | 352 | Even when subsequent rewriting happen |
|
348 | 353 | |
|
349 | 354 | $ mkcommit A_3 |
|
350 | 355 | created new head |
|
351 | 356 | $ hg debugobsolete `getid A_1` `getid A_3` |
|
352 | 357 | obsoleted 1 changesets |
|
353 | 358 | $ hg up 0 |
|
354 | 359 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
355 | 360 | $ mkcommit A_4 |
|
356 | 361 | created new head |
|
357 | 362 | $ hg debugobsolete `getid A_2` `getid A_4` |
|
358 | 363 | obsoleted 1 changesets |
|
359 | 364 | $ hg up 0 |
|
360 | 365 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
361 | 366 | $ mkcommit A_5 |
|
362 | 367 | created new head |
|
363 | 368 | $ hg debugobsolete `getid A_4` `getid A_5` |
|
364 | 369 | obsoleted 1 changesets |
|
365 | 370 | $ hg log -G --hidden |
|
366 | 371 | @ 6:e442cfc57690 A_5 |
|
367 | 372 | | |
|
368 | 373 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] |
|
369 | 374 | |/ |
|
370 | 375 | | o 4:01f36c5a8fda A_3 |
|
371 | 376 | |/ |
|
372 | 377 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] |
|
373 | 378 | |/ |
|
374 | 379 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] |
|
375 | 380 | |/ |
|
376 | 381 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] |
|
377 | 382 | |/ |
|
378 | 383 | o 0:d20a80d4def3 base |
|
379 | 384 | |
|
380 | 385 | $ hg debugsuccessorssets --hidden 'all()' |
|
381 | 386 | d20a80d4def3 |
|
382 | 387 | d20a80d4def3 |
|
383 | 388 | 007dc284c1f8 |
|
384 | 389 | 01f36c5a8fda e442cfc57690 |
|
385 | 390 | 82623d38b9ba |
|
386 | 391 | 01f36c5a8fda |
|
387 | 392 | 392fd25390da |
|
388 | 393 | e442cfc57690 |
|
389 | 394 | 01f36c5a8fda |
|
390 | 395 | 01f36c5a8fda |
|
391 | 396 | 6a411f0d7a0a |
|
392 | 397 | e442cfc57690 |
|
393 | 398 | e442cfc57690 |
|
394 | 399 | e442cfc57690 |
|
395 | 400 | $ hg debugsuccessorssets 'all()' --closest |
|
396 | 401 | d20a80d4def3 |
|
397 | 402 | d20a80d4def3 |
|
398 | 403 | 01f36c5a8fda |
|
399 | 404 | 01f36c5a8fda |
|
400 | 405 | e442cfc57690 |
|
401 | 406 | e442cfc57690 |
|
402 | 407 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
403 | 408 | d20a80d4def3 |
|
404 | 409 | d20a80d4def3 |
|
405 | 410 | 007dc284c1f8 |
|
406 | 411 | 82623d38b9ba 392fd25390da |
|
407 | 412 | 82623d38b9ba |
|
408 | 413 | 82623d38b9ba |
|
409 | 414 | 392fd25390da |
|
410 | 415 | 392fd25390da |
|
411 | 416 | 01f36c5a8fda |
|
412 | 417 | 01f36c5a8fda |
|
413 | 418 | 6a411f0d7a0a |
|
414 | 419 | e442cfc57690 |
|
415 | 420 | e442cfc57690 |
|
416 | 421 | e442cfc57690 |
|
417 | 422 | $ hg log -r 'contentdivergent()' |
|
418 | 423 | |
|
419 | 424 | Check more complex obsolescence graft (with divergence) |
|
420 | 425 | |
|
421 | 426 | $ mkcommit B_0; hg up 0 |
|
422 | 427 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
423 | 428 | $ hg debugobsolete `getid B_0` `getid A_2` |
|
424 | 429 | obsoleted 1 changesets |
|
425 | 430 | $ mkcommit A_7; hg up 0 |
|
426 | 431 | created new head |
|
427 | 432 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
428 | 433 | $ mkcommit A_8; hg up 0 |
|
429 | 434 | created new head |
|
430 | 435 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
431 | 436 | $ hg debugobsolete `getid A_5` `getid A_7` `getid A_8` |
|
432 | 437 | obsoleted 1 changesets |
|
433 | 438 | $ mkcommit A_9; hg up 0 |
|
434 | 439 | created new head |
|
435 | 440 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
436 | 441 | $ hg debugobsolete `getid A_5` `getid A_9` |
|
437 | 442 | 4 new content-divergent changesets |
|
438 | 443 | $ hg log -G --hidden |
|
439 | 444 | * 10:bed64f5d2f5a A_9 |
|
440 | 445 | | |
|
441 | 446 | | * 9:14608b260df8 A_8 |
|
442 | 447 | |/ |
|
443 | 448 | | * 8:7ae126973a96 A_7 |
|
444 | 449 | |/ |
|
445 | 450 | | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da] |
|
446 | 451 | | | |
|
447 | 452 | | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8] |
|
448 | 453 | |/ |
|
449 | 454 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] |
|
450 | 455 | |/ |
|
451 | 456 | | * 4:01f36c5a8fda A_3 |
|
452 | 457 | |/ |
|
453 | 458 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] |
|
454 | 459 | |/ |
|
455 | 460 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] |
|
456 | 461 | |/ |
|
457 | 462 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] |
|
458 | 463 | |/ |
|
459 | 464 | @ 0:d20a80d4def3 base |
|
460 | 465 | |
|
461 | 466 | $ hg debugsuccessorssets --hidden 'all()' |
|
462 | 467 | d20a80d4def3 |
|
463 | 468 | d20a80d4def3 |
|
464 | 469 | 007dc284c1f8 |
|
465 | 470 | 01f36c5a8fda bed64f5d2f5a |
|
466 | 471 | 01f36c5a8fda 7ae126973a96 14608b260df8 |
|
467 | 472 | 82623d38b9ba |
|
468 | 473 | 01f36c5a8fda |
|
469 | 474 | 392fd25390da |
|
470 | 475 | bed64f5d2f5a |
|
471 | 476 | 7ae126973a96 14608b260df8 |
|
472 | 477 | 01f36c5a8fda |
|
473 | 478 | 01f36c5a8fda |
|
474 | 479 | 6a411f0d7a0a |
|
475 | 480 | bed64f5d2f5a |
|
476 | 481 | 7ae126973a96 14608b260df8 |
|
477 | 482 | e442cfc57690 |
|
478 | 483 | bed64f5d2f5a |
|
479 | 484 | 7ae126973a96 14608b260df8 |
|
480 | 485 | 3750ebee865d |
|
481 | 486 | bed64f5d2f5a |
|
482 | 487 | 7ae126973a96 14608b260df8 |
|
483 | 488 | 7ae126973a96 |
|
484 | 489 | 7ae126973a96 |
|
485 | 490 | 14608b260df8 |
|
486 | 491 | 14608b260df8 |
|
487 | 492 | bed64f5d2f5a |
|
488 | 493 | bed64f5d2f5a |
|
489 | 494 | $ hg debugsuccessorssets 'all()' --closest |
|
490 | 495 | d20a80d4def3 |
|
491 | 496 | d20a80d4def3 |
|
492 | 497 | 01f36c5a8fda |
|
493 | 498 | 01f36c5a8fda |
|
494 | 499 | 7ae126973a96 |
|
495 | 500 | 7ae126973a96 |
|
496 | 501 | 14608b260df8 |
|
497 | 502 | 14608b260df8 |
|
498 | 503 | bed64f5d2f5a |
|
499 | 504 | bed64f5d2f5a |
|
500 | 505 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
501 | 506 | d20a80d4def3 |
|
502 | 507 | d20a80d4def3 |
|
503 | 508 | 007dc284c1f8 |
|
504 | 509 | 82623d38b9ba 392fd25390da |
|
505 | 510 | 82623d38b9ba |
|
506 | 511 | 82623d38b9ba |
|
507 | 512 | 392fd25390da |
|
508 | 513 | 392fd25390da |
|
509 | 514 | 01f36c5a8fda |
|
510 | 515 | 01f36c5a8fda |
|
511 | 516 | 6a411f0d7a0a |
|
512 | 517 | e442cfc57690 |
|
513 | 518 | e442cfc57690 |
|
514 | 519 | e442cfc57690 |
|
515 | 520 | 3750ebee865d |
|
516 | 521 | 392fd25390da |
|
517 | 522 | 7ae126973a96 |
|
518 | 523 | 7ae126973a96 |
|
519 | 524 | 14608b260df8 |
|
520 | 525 | 14608b260df8 |
|
521 | 526 | bed64f5d2f5a |
|
522 | 527 | bed64f5d2f5a |
|
523 | 528 | $ hg log -r 'contentdivergent()' |
|
524 | 529 | 4:01f36c5a8fda A_3 |
|
525 | 530 | 8:7ae126973a96 A_7 |
|
526 | 531 | 9:14608b260df8 A_8 |
|
527 | 532 | 10:bed64f5d2f5a A_9 |
|
528 | 533 | |
|
529 | 534 | fix the divergence |
|
530 | 535 | |
|
531 | 536 | $ mkcommit A_A; hg up 0 |
|
532 | 537 | created new head |
|
533 | 538 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
534 | 539 | $ hg debugobsolete `getid A_9` `getid A_A` |
|
535 | 540 | obsoleted 1 changesets |
|
536 | 541 | $ hg debugobsolete `getid A_7` `getid A_A` |
|
537 | 542 | obsoleted 1 changesets |
|
538 | 543 | $ hg debugobsolete `getid A_8` `getid A_A` |
|
539 | 544 | obsoleted 1 changesets |
|
540 | 545 | $ hg log -G --hidden |
|
541 | 546 | o 11:a139f71be9da A_A |
|
542 | 547 | | |
|
543 | 548 | | x 10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da] |
|
544 | 549 | |/ |
|
545 | 550 | | x 9:14608b260df8 A_8 [rewritten as 11:a139f71be9da] |
|
546 | 551 | |/ |
|
547 | 552 | | x 8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da] |
|
548 | 553 | |/ |
|
549 | 554 | | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da] |
|
550 | 555 | | | |
|
551 | 556 | | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8] |
|
552 | 557 | |/ |
|
553 | 558 | | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690] |
|
554 | 559 | |/ |
|
555 | 560 | | o 4:01f36c5a8fda A_3 |
|
556 | 561 | |/ |
|
557 | 562 | | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a] |
|
558 | 563 | |/ |
|
559 | 564 | | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda] |
|
560 | 565 | |/ |
|
561 | 566 | | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da] |
|
562 | 567 | |/ |
|
563 | 568 | @ 0:d20a80d4def3 base |
|
564 | 569 | |
|
565 | 570 | $ hg debugsuccessorssets --hidden 'all()' |
|
566 | 571 | d20a80d4def3 |
|
567 | 572 | d20a80d4def3 |
|
568 | 573 | 007dc284c1f8 |
|
569 | 574 | 01f36c5a8fda a139f71be9da |
|
570 | 575 | 82623d38b9ba |
|
571 | 576 | 01f36c5a8fda |
|
572 | 577 | 392fd25390da |
|
573 | 578 | a139f71be9da |
|
574 | 579 | 01f36c5a8fda |
|
575 | 580 | 01f36c5a8fda |
|
576 | 581 | 6a411f0d7a0a |
|
577 | 582 | a139f71be9da |
|
578 | 583 | e442cfc57690 |
|
579 | 584 | a139f71be9da |
|
580 | 585 | 3750ebee865d |
|
581 | 586 | a139f71be9da |
|
582 | 587 | 7ae126973a96 |
|
583 | 588 | a139f71be9da |
|
584 | 589 | 14608b260df8 |
|
585 | 590 | a139f71be9da |
|
586 | 591 | bed64f5d2f5a |
|
587 | 592 | a139f71be9da |
|
588 | 593 | a139f71be9da |
|
589 | 594 | a139f71be9da |
|
590 | 595 | $ hg debugsuccessorssets 'all()' --closest |
|
591 | 596 | d20a80d4def3 |
|
592 | 597 | d20a80d4def3 |
|
593 | 598 | 01f36c5a8fda |
|
594 | 599 | 01f36c5a8fda |
|
595 | 600 | a139f71be9da |
|
596 | 601 | a139f71be9da |
|
597 | 602 | $ hg debugsuccessorssets 'all()' --closest --hidden |
|
598 | 603 | d20a80d4def3 |
|
599 | 604 | d20a80d4def3 |
|
600 | 605 | 007dc284c1f8 |
|
601 | 606 | 82623d38b9ba 392fd25390da |
|
602 | 607 | 82623d38b9ba |
|
603 | 608 | 82623d38b9ba |
|
604 | 609 | 392fd25390da |
|
605 | 610 | 392fd25390da |
|
606 | 611 | 01f36c5a8fda |
|
607 | 612 | 01f36c5a8fda |
|
608 | 613 | 6a411f0d7a0a |
|
609 | 614 | e442cfc57690 |
|
610 | 615 | e442cfc57690 |
|
611 | 616 | e442cfc57690 |
|
612 | 617 | 3750ebee865d |
|
613 | 618 | 392fd25390da |
|
614 | 619 | 7ae126973a96 |
|
615 | 620 | a139f71be9da |
|
616 | 621 | 14608b260df8 |
|
617 | 622 | a139f71be9da |
|
618 | 623 | bed64f5d2f5a |
|
619 | 624 | a139f71be9da |
|
620 | 625 | a139f71be9da |
|
621 | 626 | a139f71be9da |
|
622 | 627 | $ hg log -r 'contentdivergent()' |
|
623 | 628 | |
|
624 | 629 | #if serve |
|
625 | 630 | |
|
626 | 631 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid --config web.view=all \ |
|
627 | 632 | > -A access.log -E errors.log |
|
628 | 633 | $ cat hg.pid >> $DAEMON_PIDS |
|
629 | 634 | |
|
630 | 635 | check an obsolete changeset that was rewritten and also split |
|
631 | 636 | |
|
632 | 637 | $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=paper' | egrep 'rewritten|split' |
|
633 | 638 | <td>rewritten as <a href="/rev/bed64f5d2f5a?style=paper">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br> |
|
634 | 639 | split as <a href="/rev/7ae126973a96?style=paper">7ae126973a96</a> <a href="/rev/14608b260df8?style=paper">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
635 | 640 | $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=coal' | egrep 'rewritten|split' |
|
636 | 641 | <td>rewritten as <a href="/rev/bed64f5d2f5a?style=coal">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br> |
|
637 | 642 | split as <a href="/rev/7ae126973a96?style=coal">7ae126973a96</a> <a href="/rev/14608b260df8?style=coal">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
638 | 643 | $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=gitweb' | egrep 'rewritten|split' |
|
639 | 644 | <td>rewritten as <a class="list" href="/rev/bed64f5d2f5a?style=gitweb">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
640 | 645 | <td>split as <a class="list" href="/rev/7ae126973a96?style=gitweb">7ae126973a96</a> <a class="list" href="/rev/14608b260df8?style=gitweb">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
641 | 646 | $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=monoblue' | egrep 'rewritten|split' |
|
642 | 647 | <dd>rewritten as <a href="/rev/bed64f5d2f5a?style=monoblue">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd> |
|
643 | 648 | <dd>split as <a href="/rev/7ae126973a96?style=monoblue">7ae126973a96</a> <a href="/rev/14608b260df8?style=monoblue">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd> |
|
644 | 649 | $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=spartan' | egrep 'rewritten|split' |
|
645 | 650 | <td class="obsolete">rewritten as <a href="/rev/bed64f5d2f5a?style=spartan">bed64f5d2f5a</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
646 | 651 | <td class="obsolete">split as <a href="/rev/7ae126973a96?style=spartan">7ae126973a96</a> <a href="/rev/14608b260df8?style=spartan">14608b260df8</a> by test <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td> |
|
647 | 652 | |
|
648 | 653 | $ killdaemons.py |
|
649 | 654 | |
|
650 | 655 | #endif |
|
651 | 656 | |
|
652 | 657 | $ cd .. |
|
653 | 658 | |
|
654 | 659 | |
|
655 | 660 | Subset does not diverge |
|
656 | 661 | ------------------------------ |
|
657 | 662 | |
|
658 | 663 | Do not report divergent successors-set if it is a subset of another |
|
659 | 664 | successors-set. (report [A,B] not [A] + [A,B]) |
|
660 | 665 | |
|
661 | 666 | $ newcase subset |
|
662 | 667 | $ hg debugobsolete `getid A_0` `getid A_2` |
|
663 | 668 | obsoleted 1 changesets |
|
664 | 669 | $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2` |
|
665 | 670 | $ hg debugsuccessorssets --hidden 'desc('A_0')' |
|
666 | 671 | 007dc284c1f8 |
|
667 | 672 | 82623d38b9ba 392fd25390da |
|
668 | 673 | $ hg debugsuccessorssets 'desc('A_0')' --closest |
|
669 | 674 | $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden |
|
670 | 675 | 007dc284c1f8 |
|
671 | 676 | 82623d38b9ba 392fd25390da |
|
672 | 677 | |
|
673 | 678 | $ cd .. |
|
674 | 679 | |
|
675 | 680 | Use scmutil.cleanupnodes API to create divergence |
|
676 | 681 | |
|
677 | 682 | $ hg init cleanupnodes |
|
678 | 683 | $ cd cleanupnodes |
|
679 | 684 | $ hg debugdrawdag <<'EOS' |
|
680 | 685 | > B1 B3 B4 |
|
681 | 686 | > | \| |
|
682 | 687 | > A Z |
|
683 | 688 | > EOS |
|
684 | 689 | |
|
685 | 690 | $ hg update -q B1 |
|
686 | 691 | $ echo 3 >> B |
|
687 | 692 | $ hg commit --amend -m B2 |
|
688 | 693 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF |
|
689 | 694 | > from mercurial import registrar, scmutil |
|
690 | 695 | > cmdtable = {} |
|
691 | 696 | > command = registrar.command(cmdtable) |
|
692 | 697 | > @command('cleanup') |
|
693 | 698 | > def cleanup(ui, repo): |
|
694 | 699 | > def node(expr): |
|
695 | 700 | > unfi = repo.unfiltered() |
|
696 | 701 | > rev = unfi.revs(expr).first() |
|
697 | 702 | > return unfi.changelog.node(rev) |
|
698 | 703 | > with repo.wlock(), repo.lock(), repo.transaction('delayedstrip'): |
|
699 | 704 | > mapping = {node('desc(B1)'): [node('desc(B3)')], |
|
700 | 705 | > node('desc(B3)'): [node('desc(B4)')]} |
|
701 | 706 | > scmutil.cleanupnodes(repo, mapping, 'test') |
|
702 | 707 | > EOF |
|
703 | 708 | |
|
704 | 709 | $ rm .hg/localtags |
|
705 | 710 | $ hg cleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
706 | 711 | 2 new content-divergent changesets |
|
707 | 712 | $ hg log -G -T '{rev}:{node|short} {desc} {instabilities}' -r 'sort(all(), topo)' |
|
708 | 713 | @ 5:1a2a9b5b0030 B2 content-divergent |
|
709 | 714 | | |
|
710 | 715 | | * 4:70d5a63ca112 B4 content-divergent |
|
711 | 716 | | | |
|
712 | 717 | | o 1:48b9aae0607f Z |
|
713 | 718 | | |
|
714 | 719 | o 0:426bada5c675 A |
|
715 | 720 | |
|
716 | 721 | $ hg debugobsolete |
|
717 | 722 | a178212c3433c4e77b573f6011e29affb8aefa33 1a2a9b5b0030632400aa78e00388c20f99d3ec44 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
718 | 723 | a178212c3433c4e77b573f6011e29affb8aefa33 ad6478fb94ecec98b86daae98722865d494ac561 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'test', 'user': 'test'} |
|
719 | 724 | ad6478fb94ecec98b86daae98722865d494ac561 70d5a63ca112acb3764bc1d7320ca90ea688d671 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'test', 'user': 'test'} |
|
720 | 725 | |
|
721 | 726 | $ hg debugwhyunstable 1a2a9b5b0030 |
|
722 | 727 | content-divergent: 70d5a63ca112acb3764bc1d7320ca90ea688d671 (draft) predecessor a178212c3433c4e77b573f6011e29affb8aefa33 |
|
723 | 728 | |
|
724 | 729 | $ hg log -r 1a2a9b5b0030 -T '{whyunstable}\n' |
|
725 | 730 | content-divergent: 4:70d5a63ca112 (draft) predecessor a178212c3433 |
|
726 |
$ hg log -r 1a2a9b5b0030 -T |
|
|
731 | $ hg log -r 1a2a9b5b0030 -T whyunstableshort | |
|
727 | 732 | content-divergent: 4:70d5a63ca112 (draft) predecessor a178 |
|
728 | $ hg log -r 1a2a9b5b0030 -T '{whyunstable % "{instability}:{divergentnodes % " {node|shortest} ({phase})"} {reason} {node|shortest}\n"}' | |
|
733 | $ hg log -r 1a2a9b5b0030 -T whyunstableshorter | |
|
729 | 734 | content-divergent: 70d5 (draft) predecessor a178 |
|
730 | 735 | |
|
731 | 736 | #if serve |
|
732 | 737 | |
|
733 | 738 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
734 | 739 | $ cat hg.pid >> $DAEMON_PIDS |
|
735 | 740 | |
|
736 | 741 | check explanation for a content-divergent changeset |
|
737 | 742 | |
|
738 | 743 | $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=paper' | grep divergent: |
|
739 | 744 | <td>content-divergent: <a href="/rev/70d5a63ca112?style=paper">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=paper">a178212c3433</a></td> |
|
740 | 745 | $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=coal' | grep divergent: |
|
741 | 746 | <td>content-divergent: <a href="/rev/70d5a63ca112?style=coal">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=coal">a178212c3433</a></td> |
|
742 | 747 | $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=gitweb' | grep divergent: |
|
743 | 748 | <td>content-divergent: <a class="list" href="/rev/70d5a63ca112?style=gitweb">70d5a63ca112</a> (draft) predecessor <a class="list" href="/rev/a178212c3433?style=gitweb">a178212c3433</a></td> |
|
744 | 749 | $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=monoblue' | grep divergent: |
|
745 | 750 | <dd>content-divergent: <a href="/rev/70d5a63ca112?style=monoblue">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=monoblue">a178212c3433</a></dd> |
|
746 | 751 | $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=spartan' | grep divergent: |
|
747 | 752 | <td class="unstable">content-divergent: <a href="/rev/70d5a63ca112?style=spartan">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=spartan">a178212c3433</a></td> |
|
748 | 753 | |
|
749 | 754 | $ killdaemons.py |
|
750 | 755 | |
|
751 | 756 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now