Mercurial > evolve
comparison tests/test-evolve-content-divergent-interrupted.t @ 5787:32c0b2899fc4
divergence-resolution: [patch 2] fix a messed up test case
Because of logic change in divergence resolution which causes the order change
in picking the resolution parent this test case was messed up.
It was supposed to test that that it hits conflict while relocating the
divergent cset but because of some change in previous patches, relocation went
successful and it hits conflict while merging the two divergent csets.
This patch, by making some changes in files content make sure that we get
conflict during relocation.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 24 Jan 2021 20:09:02 +0530 |
parents | c0122b98356c |
children | 961a940aef57 |
comparison
equal
deleted
inserted
replaced
5786:c0122b98356c | 5787:32c0b2899fc4 |
---|---|
257 $ hg init multiparent | 257 $ hg init multiparent |
258 $ cd multiparent | 258 $ cd multiparent |
259 $ echo ".*\.orig" > .hgignore | 259 $ echo ".*\.orig" > .hgignore |
260 $ hg add .hgignore | 260 $ hg add .hgignore |
261 $ hg ci -m "added hgignore" | 261 $ hg ci -m "added hgignore" |
262 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; | 262 $ for ch in a b c; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; |
263 | 263 |
264 $ hg glog | 264 $ hg glog |
265 @ 4:c41c793e0ef1 added d | 265 @ 3:ca1b80f7960a added c |
266 | () draft | 266 | () draft |
267 o 3:ca1b80f7960a added c | 267 o 2:b1661037fa25 added b |
268 | () draft | 268 | () draft |
269 o 2:b1661037fa25 added b | 269 o 1:c7586e2a9264 added a |
270 | () draft | 270 | () draft |
271 o 1:c7586e2a9264 added a | 271 o 0:8fa14d15e168 added hgignore |
272 | () draft | 272 () draft |
273 o 0:8fa14d15e168 added hgignore | 273 |
274 () draft | 274 changes to get merge conflict during relocation |
275 $ echo "some_changes" >> a | |
276 $ hg amend | |
277 $ echo foo > d | |
278 $ hg add d | |
279 $ hg ci -m "added d" | |
275 | 280 |
276 $ hg rebase -r . -d .^^^ --config extensions.rebase= | 281 $ hg rebase -r . -d .^^^ --config extensions.rebase= |
277 rebasing 4:c41c793e0ef1 tip "added d" | 282 rebasing 5:f8b09dd867e5 tip "added d" |
278 $ echo bar > c | 283 $ echo bar > c |
279 $ hg add c | 284 $ hg add c |
280 $ hg amend | 285 $ hg amend |
281 | 286 |
282 $ hg up --hidden 'min(desc("added d"))' | 287 $ hg up --hidden 'min(desc("added d"))' |
283 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 288 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
284 updated to hidden changeset c41c793e0ef1 | 289 updated to hidden changeset f8b09dd867e5 |
285 (hidden revision 'c41c793e0ef1' was rewritten as: 69bdd23a9b0d) | 290 (hidden revision 'f8b09dd867e5' was rewritten as: 6f7eaf1944c0) |
286 working directory parent is obsolete! (c41c793e0ef1) | 291 working directory parent is obsolete! (f8b09dd867e5) |
287 (use 'hg evolve' to update to its successor: 69bdd23a9b0d) | 292 (use 'hg evolve' to update to its successor: 6f7eaf1944c0) |
288 $ echo bar > d | 293 $ echo bar > d |
294 $ echo "latest_changes" >> a | |
289 $ hg amend | 295 $ hg amend |
290 2 new content-divergent changesets | 296 2 new content-divergent changesets |
291 | 297 |
292 $ hg glog | 298 $ hg glog |
293 @ 7:e49523854bc8 added d | 299 @ 8:a8673909e314 added d |
294 | () draft | 300 | () draft |
295 | * 6:69bdd23a9b0d added d | 301 | * 7:6f7eaf1944c0 added d |
296 | | () draft | 302 | | () draft |
297 o | 3:ca1b80f7960a added c | 303 o | 4:33c16a2e0eb8 added c |
298 | | () draft | 304 | | () draft |
299 o | 2:b1661037fa25 added b | 305 o | 2:b1661037fa25 added b |
300 |/ () draft | 306 |/ () draft |
301 o 1:c7586e2a9264 added a | 307 o 1:c7586e2a9264 added a |
302 | () draft | 308 | () draft |
303 o 0:8fa14d15e168 added hgignore | 309 o 0:8fa14d15e168 added hgignore |
304 () draft | 310 () draft |
305 | 311 |
306 $ hg evolve --content-divergent | 312 $ hg evolve --content-divergent |
307 merge:[6] added d | 313 merge:[7] added d |
308 with: [7] added d | 314 with: [8] added d |
309 base: [4] added d | 315 base: [5] added d |
310 rebasing "other" content-divergent changeset e49523854bc8 on c7586e2a9264 | 316 rebasing "other" content-divergent changeset a8673909e314 on c7586e2a9264 |
311 file 'c' was deleted in other but was modified in local. | 317 merging a |
312 You can use (c)hanged version, (d)elete, or leave (u)nresolved. | 318 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
313 What do you want to do? u | |
314 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
315 unresolved merge conflicts | 319 unresolved merge conflicts |
316 (see 'hg help evolve.interrupted') | 320 (see 'hg help evolve.interrupted') |
317 [240] | 321 [240] |
318 | 322 |
319 $ hg evolve --abort | 323 $ hg evolve --abort |
320 evolve aborted | 324 evolve aborted |
321 working directory is now at e49523854bc8 | 325 working directory is now at a8673909e314 |
322 | 326 |
323 $ hg glog | 327 $ hg glog |
324 @ 7:e49523854bc8 added d | 328 @ 8:a8673909e314 added d |
325 | () draft | 329 | () draft |
326 | * 6:69bdd23a9b0d added d | 330 | * 7:6f7eaf1944c0 added d |
327 | | () draft | 331 | | () draft |
328 o | 3:ca1b80f7960a added c | 332 o | 4:33c16a2e0eb8 added c |
329 | | () draft | 333 | | () draft |
330 o | 2:b1661037fa25 added b | 334 o | 2:b1661037fa25 added b |
331 |/ () draft | 335 |/ () draft |
332 o 1:c7586e2a9264 added a | 336 o 1:c7586e2a9264 added a |
333 | () draft | 337 | () draft |
337 Creating content-divergence on multiple parents when gca of divergent changesets | 341 Creating content-divergence on multiple parents when gca of divergent changesets |
338 is parent of one of the divergents and merging divergent leads to conflicts | 342 is parent of one of the divergents and merging divergent leads to conflicts |
339 --------------------------------------------------------------------------------- | 343 --------------------------------------------------------------------------------- |
340 | 344 |
341 $ hg up 'min(desc("added d"))' | 345 $ hg up 'min(desc("added d"))' |
342 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | 346 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
343 $ hg rm c | 347 $ hg rm c |
344 $ echo wat > d | 348 $ echo wat > d |
345 $ hg amend | 349 $ hg amend |
346 | 350 |
347 $ hg glog | 351 $ hg glog |
348 @ 8:33e4442acf98 added d | 352 @ 9:b6a3f3ee0c44 added d |
349 | () draft | 353 | () draft |
350 | * 7:e49523854bc8 added d | 354 | * 8:a8673909e314 added d |
351 | | () draft | 355 | | () draft |
352 | o 3:ca1b80f7960a added c | 356 | o 4:33c16a2e0eb8 added c |
353 | | () draft | 357 | | () draft |
354 | o 2:b1661037fa25 added b | 358 | o 2:b1661037fa25 added b |
355 |/ () draft | 359 |/ () draft |
356 o 1:c7586e2a9264 added a | 360 o 1:c7586e2a9264 added a |
357 | () draft | 361 | () draft |
358 o 0:8fa14d15e168 added hgignore | 362 o 0:8fa14d15e168 added hgignore |
359 () draft | 363 () draft |
360 | 364 |
361 $ hg evolve --content-divergent | 365 $ hg evolve --content-divergent |
362 merge:[7] added d | 366 merge:[8] added d |
363 with: [8] added d | 367 with: [9] added d |
364 base: [4] added d | 368 base: [5] added d |
365 rebasing "divergent" content-divergent changeset e49523854bc8 on c7586e2a9264 | 369 rebasing "divergent" content-divergent changeset a8673909e314 on c7586e2a9264 |
366 merging d | 370 merging a |
367 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') | 371 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
368 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
369 unresolved merge conflicts | 372 unresolved merge conflicts |
370 (see 'hg help evolve.interrupted') | 373 (see 'hg help evolve.interrupted') |
371 [240] | 374 [240] |
372 | 375 |
373 $ hg evolve --abort | 376 $ hg evolve --abort |
374 evolve aborted | 377 evolve aborted |
375 working directory is now at 33e4442acf98 | 378 working directory is now at b6a3f3ee0c44 |
376 | 379 |
377 $ hg glog | 380 $ hg glog |
378 @ 8:33e4442acf98 added d | 381 @ 9:b6a3f3ee0c44 added d |
379 | () draft | 382 | () draft |
380 | * 7:e49523854bc8 added d | 383 | * 8:a8673909e314 added d |
381 | | () draft | 384 | | () draft |
382 | o 3:ca1b80f7960a added c | 385 | o 4:33c16a2e0eb8 added c |
383 | | () draft | 386 | | () draft |
384 | o 2:b1661037fa25 added b | 387 | o 2:b1661037fa25 added b |
385 |/ () draft | 388 |/ () draft |
386 o 1:c7586e2a9264 added a | 389 o 1:c7586e2a9264 added a |
387 | () draft | 390 | () draft |