changeset 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 91ae09010950
children 6e3a6774d998
files tests/test-rebase-conflicts.t
diffstat 1 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.