# HG changeset patch # User Jun Wu # Date 1498325501 25200 # Node ID 181ca34883e67e99bf6340b5931ac6d5a894092f # Parent 91ae0901095040206747d5b67ef79f36a83b430e 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. diff -r 91ae09010950 -r 181ca34883e6 tests/test-rebase-conflicts.t --- a/tests/test-rebase-conflicts.t Sat Jun 24 15:50:13 2017 -0400 +++ b/tests/test-rebase-conflicts.t Sat Jun 24 10:31:41 2017 -0700 @@ -3,6 +3,7 @@ > usegeneraldelta=yes > [extensions] > rebase= + > drawdag=$TESTDIR/drawdag.py > > [phases] > publish=False @@ -363,3 +364,50 @@ +b +c +>>>>>>> source: 7bc217434fc1 - test: abc + +Test rebase with obsstore turned on and off (issue5606) + + $ cd $TESTTMP + $ hg init b + $ cd b + $ hg debugdrawdag <<'EOS' + > D + > | + > C + > | + > B E + > |/ + > A + > EOS + + $ hg update E -q + $ echo 3 > B + $ hg commit --amend -m E -A B -q + $ hg rebase -r B+D -d . --config experimental.evolution=all + rebasing 1:112478962961 "B" (B) + merging B + warning: conflicts while merging B! (edit, then use 'hg resolve --mark') + unresolved conflicts (see hg resolve, then hg rebase --continue) + [1] + + $ echo 4 > B + $ hg resolve -m + (no more unresolved files) + continue: hg rebase --continue + $ hg rebase --continue --config experimental.evolution=none + rebasing 1:112478962961 "B" (B) + not rebasing ignored 2:26805aba1e60 "C" (C) + rebasing 3:f585351a92f8 "D" (D) + saved backup bundle to $TESTTMP/b/.hg/strip-backup/f585351a92f8-cb2a9b47-backup.hg (glob) + + $ rm .hg/localtags + $ hg tglog + o 3:draft 'D' + | + o 2:draft 'B' + | + @ 1:draft 'E' + | + o 0:draft 'A' + +Note the above graph is wrong since C got stripped incorrectly.