Mercurial > hg
comparison tests/test-histedit-obsolete.t @ 25894:54f9561088c7 stable
histedit: backout ebb5bb9bc32e
The faulty changeset use obsolescence marker to roll the repository back on
--abort. This is a problematic approach because --abort should be as close as an
actually transaction rollback as possible stripping all created data from the
repository (cf `hg rebase --abort` stripping all created changesets). Instead
ebb5bb9bc32e made all content created during the aborted histedit still
available in the repository adding obsolescence marker to make them hidden. This
will cause trouble to evolution user as a re-run of the same histedit (with
success) will likely result in the very same node to be "recreated" while
obsolescence marker would be in place for them. And canceling an obsoletion is
still a fairly complicated process.
This also rollback using obsmarkers instead of strip to clean up temporary node
on successful histedit run because the two change were not split in separated
changeset. Rolling that part back does not have significant consequence a will
have to be resubmitted independently
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 31 Jul 2015 15:11:07 -0700 |
parents | ebb5bb9bc32e |
children | 5706d130ec16 |
comparison
equal
deleted
inserted
replaced
25889:79f0cb97d753 | 25894:54f9561088c7 |
---|---|
62 > drop d2ae7f538514 1 b | 62 > drop d2ae7f538514 1 b |
63 > pick 055a42cdd887 3 d | 63 > pick 055a42cdd887 3 d |
64 > fold e860deea161a 4 e | 64 > fold e860deea161a 4 e |
65 > pick 652413bf663e 5 f | 65 > pick 652413bf663e 5 f |
66 > EOF | 66 > EOF |
67 [1] | 67 saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-3c6c5d92-backup.hg (glob) |
68 $ hg log --graph --hidden | 68 $ hg log --graph --hidden |
69 @ 10:cacdfd884a93 f | 69 @ 8:cacdfd884a93 f |
70 | | 70 | |
71 o 9:59d9f330561f d | 71 o 7:59d9f330561f d |
72 | | 72 | |
73 | x 8:b558abc46d09 fold-temp-revision e860deea161a | |
74 | | | |
75 | x 7:96e494a2d553 d | |
76 |/ | |
77 o 6:b346ab9a313d c | 73 o 6:b346ab9a313d c |
78 | | 74 | |
79 | x 5:652413bf663e f | 75 | x 5:652413bf663e f |
80 | | | 76 | | |
81 | x 4:e860deea161a e | 77 | x 4:e860deea161a e |
92 d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b} (*) {'user': 'test'} (glob) | 88 d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b} (*) {'user': 'test'} (glob) |
93 177f92b773850b59254aa5e923436f921b55483b b346ab9a313db8537ecf96fca3ca3ca984ef3bd7 0 (*) {'user': 'test'} (glob) | 89 177f92b773850b59254aa5e923436f921b55483b b346ab9a313db8537ecf96fca3ca3ca984ef3bd7 0 (*) {'user': 'test'} (glob) |
94 055a42cdd88768532f9cf79daa407fc8d138de9b 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob) | 90 055a42cdd88768532f9cf79daa407fc8d138de9b 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob) |
95 e860deea161a2f77de56603b340ebbb4536308ae 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob) | 91 e860deea161a2f77de56603b340ebbb4536308ae 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob) |
96 652413bf663ef2a641cab26574e46d5f5a64a55a cacdfd884a9321ec4e1de275ef3949fa953a1f83 0 (*) {'user': 'test'} (glob) | 92 652413bf663ef2a641cab26574e46d5f5a64a55a cacdfd884a9321ec4e1de275ef3949fa953a1f83 0 (*) {'user': 'test'} (glob) |
97 96e494a2d553dd05902ba1cee1d94d4cb7b8faed 0 {b346ab9a313db8537ecf96fca3ca3ca984ef3bd7} (*) {'user': 'test'} (glob) | |
98 b558abc46d09c30f57ac31e85a8a3d64d2e906e4 0 {96e494a2d553dd05902ba1cee1d94d4cb7b8faed} (*) {'user': 'test'} (glob) | |
99 | 93 |
100 | 94 |
101 Ensure hidden revision does not prevent histedit | 95 Ensure hidden revision does not prevent histedit |
102 ------------------------------------------------- | 96 ------------------------------------------------- |
103 | 97 |
109 > pick cacdfd884a93 8 f | 103 > pick cacdfd884a93 8 f |
110 > EOF | 104 > EOF |
111 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | 105 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
112 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 106 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
113 $ hg log --graph | 107 $ hg log --graph |
114 @ 11:c13eb81022ca f | 108 @ 9:c13eb81022ca f |
115 | | 109 | |
116 o 6:b346ab9a313d c | 110 o 6:b346ab9a313d c |
117 | | 111 | |
118 o 0:cb9a9f314b8b a | 112 o 0:cb9a9f314b8b a |
119 | 113 |
131 --------------------------------------------------------------------- | 125 --------------------------------------------------------------------- |
132 | 126 |
133 $ hg up '.^' | 127 $ hg up '.^' |
134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 128 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
135 $ hg log -r 'children(.)' | 129 $ hg log -r 'children(.)' |
136 11:c13eb81022ca f (no-eol) | 130 9:c13eb81022ca f (no-eol) |
137 $ hg histedit -r '.' --commands - <<EOF | 131 $ hg histedit -r '.' --commands - <<EOF |
138 > edit b346ab9a313d 6 c | 132 > edit b346ab9a313d 6 c |
139 > EOF | 133 > EOF |
140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
141 adding c | 135 adding c |
145 $ echo c >> c | 139 $ echo c >> c |
146 $ hg histedit --continue | 140 $ hg histedit --continue |
147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 141 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
148 | 142 |
149 $ hg log -r 'unstable()' | 143 $ hg log -r 'unstable()' |
150 11:c13eb81022ca f (no-eol) | 144 9:c13eb81022ca f (no-eol) |
151 | 145 |
152 stabilise | 146 stabilise |
153 | 147 |
154 $ hg rebase -r 'unstable()' -d . | 148 $ hg rebase -r 'unstable()' -d . |
155 rebasing 11:c13eb81022ca "f" | 149 rebasing 9:c13eb81022ca "f" |
156 $ hg up tip -q | 150 $ hg up tip -q |
157 | 151 |
158 Test dropping of changeset on the top of the stack | 152 Test dropping of changeset on the top of the stack |
159 ------------------------------------------------------- | 153 ------------------------------------------------------- |
160 | 154 |
170 > pick 40db8afa467b 10 c | 164 > pick 40db8afa467b 10 c |
171 > drop b449568bf7fc 11 f | 165 > drop b449568bf7fc 11 f |
172 > EOF | 166 > EOF |
173 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 167 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
174 $ hg log -G | 168 $ hg log -G |
175 @ 12:40db8afa467b c | 169 @ 10:40db8afa467b c |
176 | | 170 | |
177 o 0:cb9a9f314b8b a | 171 o 0:cb9a9f314b8b a |
178 | 172 |
179 | 173 |
180 With rewritten ancestors | 174 With rewritten ancestors |
192 > EOF | 186 > EOF |
193 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | 187 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
194 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 188 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
195 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 189 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
196 $ hg log -G | 190 $ hg log -G |
197 @ 17:ee6544123ab8 c | 191 @ 15:ee6544123ab8 c |
198 | | 192 | |
199 o 16:269e713e9eae g | 193 o 14:269e713e9eae g |
200 | | 194 | |
201 o 0:cb9a9f314b8b a | 195 o 0:cb9a9f314b8b a |
202 | 196 |
203 $ cd ../base | 197 $ cd ../base |
204 | 198 |
216 > EOF | 210 > EOF |
217 | 211 |
218 $ hg ph -pv '.^' | 212 $ hg ph -pv '.^' |
219 phase changed for 2 changesets | 213 phase changed for 2 changesets |
220 $ hg log -G | 214 $ hg log -G |
221 @ 13:b449568bf7fc (draft) f | 215 @ 11:b449568bf7fc (draft) f |
222 | | 216 | |
223 o 12:40db8afa467b (public) c | 217 o 10:40db8afa467b (public) c |
224 | | 218 | |
225 o 0:cb9a9f314b8b (public) a | 219 o 0:cb9a9f314b8b (public) a |
226 | 220 |
227 $ hg histedit -r '.~2' | 221 $ hg histedit -r '.~2' |
228 abort: cannot edit public changeset: cb9a9f314b8b | 222 abort: cannot edit public changeset: cb9a9f314b8b |
238 > hg add $x | 232 > hg add $x |
239 > hg ci -m $x | 233 > hg ci -m $x |
240 > done | 234 > done |
241 $ hg phase --force --secret .~2 | 235 $ hg phase --force --secret .~2 |
242 $ hg log -G | 236 $ hg log -G |
243 @ 18:ee118ab9fa44 (secret) k | 237 @ 16:ee118ab9fa44 (secret) k |
244 | | 238 | |
245 o 17:3a6c53ee7f3d (secret) j | 239 o 15:3a6c53ee7f3d (secret) j |
246 | | 240 | |
247 o 16:b605fb7503f2 (secret) i | 241 o 14:b605fb7503f2 (secret) i |
248 | | 242 | |
249 o 15:7395e1ff83bd (draft) h | 243 o 13:7395e1ff83bd (draft) h |
250 | | 244 | |
251 o 14:6b70183d2492 (draft) g | 245 o 12:6b70183d2492 (draft) g |
252 | | 246 | |
253 o 13:b449568bf7fc (draft) f | 247 o 11:b449568bf7fc (draft) f |
254 | | 248 | |
255 o 12:40db8afa467b (public) c | 249 o 10:40db8afa467b (public) c |
256 | | 250 | |
257 o 0:cb9a9f314b8b (public) a | 251 o 0:cb9a9f314b8b (public) a |
258 | 252 |
259 $ cd .. | 253 $ cd .. |
260 | 254 |
288 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 282 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
289 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 283 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
290 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
291 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 285 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
292 $ hg log -G | 286 $ hg log -G |
293 @ 24:12e89af74238 (secret) k | 287 @ 22:12e89af74238 (secret) k |
294 | | 288 | |
295 o 23:636a8687b22e (secret) j | 289 o 21:636a8687b22e (secret) j |
296 | | 290 | |
297 o 22:ccaf0a38653f (secret) i | 291 o 20:ccaf0a38653f (secret) i |
298 | | 292 | |
299 o 21:11a89d1c2613 (draft) h | 293 o 19:11a89d1c2613 (draft) h |
300 | | 294 | |
301 o 20:c1dec7ca82ea (draft) g | 295 o 18:c1dec7ca82ea (draft) g |
302 | | 296 | |
303 o 19:087281e68428 (draft) f | 297 o 17:087281e68428 (draft) f |
304 | | 298 | |
305 o 12:40db8afa467b (public) c | 299 o 10:40db8afa467b (public) c |
306 | | 300 | |
307 o 0:cb9a9f314b8b (public) a | 301 o 0:cb9a9f314b8b (public) a |
308 | 302 |
309 $ cd .. | 303 $ cd .. |
310 | 304 |
337 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 331 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
338 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 332 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
339 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
340 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
341 $ hg log -G | 335 $ hg log -G |
342 @ 24:12e89af74238 (secret) k | 336 @ 22:12e89af74238 (secret) k |
343 | | 337 | |
344 o 23:636a8687b22e (secret) j | 338 o 21:636a8687b22e (secret) j |
345 | | 339 | |
346 o 22:ccaf0a38653f (secret) i | 340 o 20:ccaf0a38653f (secret) i |
347 | | 341 | |
348 o 21:11a89d1c2613 (draft) h | 342 o 19:11a89d1c2613 (draft) h |
349 | | 343 | |
350 o 20:c1dec7ca82ea (draft) g | 344 o 18:c1dec7ca82ea (draft) g |
351 | | 345 | |
352 o 19:087281e68428 (draft) f | 346 o 17:087281e68428 (draft) f |
353 | | 347 | |
354 o 12:40db8afa467b (public) c | 348 o 10:40db8afa467b (public) c |
355 | | 349 | |
356 o 0:cb9a9f314b8b (public) a | 350 o 0:cb9a9f314b8b (public) a |
357 | 351 |
358 $ cd .. | 352 $ cd .. |
359 | 353 |
379 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 373 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
380 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 374 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
381 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 375 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
382 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 376 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
383 $ hg log -G | 377 $ hg log -G |
384 @ 23:558246857888 (secret) k | 378 @ 21:558246857888 (secret) k |
385 | | 379 | |
386 o 22:28bd44768535 (secret) h | 380 o 20:28bd44768535 (secret) h |
387 | | 381 | |
388 o 21:d5395202aeb9 (secret) i | 382 o 19:d5395202aeb9 (secret) i |
389 | | 383 | |
390 o 20:21edda8e341b (secret) g | 384 o 18:21edda8e341b (secret) g |
391 | | 385 | |
392 o 19:5ab64f3a4832 (secret) j | 386 o 17:5ab64f3a4832 (secret) j |
393 | | 387 | |
394 o 13:b449568bf7fc (draft) f | 388 o 11:b449568bf7fc (draft) f |
395 | | 389 | |
396 o 12:40db8afa467b (public) c | 390 o 10:40db8afa467b (public) c |
397 | | 391 | |
398 o 0:cb9a9f314b8b (public) a | 392 o 0:cb9a9f314b8b (public) a |
399 | 393 |
400 $ cd .. | 394 $ cd .. |
401 | 395 |
432 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 426 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
433 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 427 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
434 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 428 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 429 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
436 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 430 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
437 $ hg log -G | 431 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/58019c66f35f-96092fce-backup.hg (glob) |
438 @ 27:f9daec13fb98 (secret) i | 432 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/83d1858e070b-f3469cf8-backup.hg (glob) |
439 | | 433 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/859969f5ed7e-d89a19d7-backup.hg (glob) |
440 o 24:49807617f46a (secret) g | 434 $ hg log -G |
441 | | 435 @ 19:f9daec13fb98 (secret) i |
442 o 21:050280826e04 (draft) h | 436 | |
443 | | 437 o 18:49807617f46a (secret) g |
444 o 12:40db8afa467b (public) c | 438 | |
445 | | 439 o 17:050280826e04 (draft) h |
446 o 0:cb9a9f314b8b (public) a | 440 | |
447 | 441 o 10:40db8afa467b (public) c |
448 $ hg co 24 | 442 | |
443 o 0:cb9a9f314b8b (public) a | |
444 | |
445 $ hg co 18 | |
449 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 446 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
450 $ echo wat >> wat | 447 $ echo wat >> wat |
451 $ hg add wat | 448 $ hg add wat |
452 $ hg ci -m 'add wat' | 449 $ hg ci -m 'add wat' |
453 created new head | 450 created new head |
454 $ hg merge 27 | 451 $ hg merge 19 |
455 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 452 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
456 (branch merge, don't forget to commit) | 453 (branch merge, don't forget to commit) |
457 $ hg ci -m 'merge' | 454 $ hg ci -m 'merge' |
458 $ echo not wat > wat | 455 $ echo not wat > wat |
459 $ hg ci -m 'modify wat' | 456 $ hg ci -m 'modify wat' |
460 $ hg histedit 21 | 457 $ hg histedit 17 |
461 abort: cannot edit history that contains merges | 458 abort: cannot edit history that contains merges |
462 [255] | 459 [255] |
463 $ cd .. | 460 $ cd .. |