comparison tests/test-rebase-conflicts.t @ 33034:181ca34883e6

test-rebase-conflicts: add a test case about turning obsstore on and off Turning obsstore and allowunstable on, rebase will skip the "can't remove original changesets with unrebased descendants" check. Then rebase could be interrupted (merge conflict), and the user has a chance to turn off obsstore. If rebase continues, the current code may strip irrelevant commits (in the test case added, "C" got stripped unexpectedly). The test case reproduces issue5606. It will be fixed by the "multidest" rebase refactoring being reviewed. The test case itself is relatively separate from the rebase refactoring, therefore sent separately hoping to reduce the number of patches of the main rebase series.
author Jun Wu <quark@fb.com>
date Sat, 24 Jun 2017 10:31:41 -0700
parents 8e3021fd1a44
children 40ee74bfa111
comparison
equal deleted inserted replaced
33033:91ae09010950 33034:181ca34883e6
1 $ cat >> $HGRCPATH <<EOF 1 $ cat >> $HGRCPATH <<EOF
2 > [format] 2 > [format]
3 > usegeneraldelta=yes 3 > usegeneraldelta=yes
4 > [extensions] 4 > [extensions]
5 > rebase= 5 > rebase=
6 > drawdag=$TESTDIR/drawdag.py
6 > 7 >
7 > [phases] 8 > [phases]
8 > publish=False 9 > publish=False
9 > 10 >
10 > [alias] 11 > [alias]
361 +||||||| base 362 +||||||| base
362 +======= 363 +=======
363 +b 364 +b
364 +c 365 +c
365 +>>>>>>> source: 7bc217434fc1 - test: abc 366 +>>>>>>> source: 7bc217434fc1 - test: abc
367
368 Test rebase with obsstore turned on and off (issue5606)
369
370 $ cd $TESTTMP
371 $ hg init b
372 $ cd b
373 $ hg debugdrawdag <<'EOS'
374 > D
375 > |
376 > C
377 > |
378 > B E
379 > |/
380 > A
381 > EOS
382
383 $ hg update E -q
384 $ echo 3 > B
385 $ hg commit --amend -m E -A B -q
386 $ hg rebase -r B+D -d . --config experimental.evolution=all
387 rebasing 1:112478962961 "B" (B)
388 merging B
389 warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
390 unresolved conflicts (see hg resolve, then hg rebase --continue)
391 [1]
392
393 $ echo 4 > B
394 $ hg resolve -m
395 (no more unresolved files)
396 continue: hg rebase --continue
397 $ hg rebase --continue --config experimental.evolution=none
398 rebasing 1:112478962961 "B" (B)
399 not rebasing ignored 2:26805aba1e60 "C" (C)
400 rebasing 3:f585351a92f8 "D" (D)
401 saved backup bundle to $TESTTMP/b/.hg/strip-backup/f585351a92f8-cb2a9b47-backup.hg (glob)
402
403 $ rm .hg/localtags
404 $ hg tglog
405 o 3:draft 'D'
406 |
407 o 2:draft 'B'
408 |
409 @ 1:draft 'E'
410 |
411 o 0:draft 'A'
412
413 Note the above graph is wrong since C got stripped incorrectly.