# HG changeset patch # User Pierre-Yves David # Date 2016-02-08 13:02:53 # Node ID ab382192337a6a9d02469d631835cd13a8c5a86d # Parent a5f0c0aab2bbb8b9d2b784040406324936c57aa8 tests: remove third head in some of the 'rebase-parameters' tests These tests do not care about that extra branch at all. In future changeset we will make rebase behave like merge and abort in case of an ambiguous destination (eg: multiple other heads) and that extra branch will make the command invocation breaks. We preventively remove this extra branch from the relevant tests in an independant changeset to reduce noise and increase confidence in the final change. diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t --- a/tests/test-rebase-parameters.t +++ b/tests/test-rebase-parameters.t @@ -46,11 +46,14 @@ $ cd .. +Version with only two heads (to allow default destination to work) + + $ hg clone -q -u . a a2heads -r 3 -r 8 These fail: - $ hg clone -q -u . a a1 - $ cd a1 + $ hg clone -q -u . a a0 + $ cd a0 $ hg rebase -s 8 -d 7 nothing to rebase @@ -117,6 +120,9 @@ These work: Rebase with no arguments (from 3 onto 8): + $ cd .. + $ hg clone -q -u . a2heads a1 + $ cd a1 $ hg up -q -C 3 $ hg rebase @@ -126,22 +132,18 @@ Rebase with no arguments (from 3 onto 8) saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - @ 8: 'D' - | - o 7: 'C' + @ 6: 'D' | - o 6: 'B' + o 5: 'C' | - o 5: 'I' + o 4: 'B' | - o 4: 'H' + o 3: 'I' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 2: 'H' + | + o 1: 'F' + | o 0: 'A' Try to rollback after a rebase (fail): @@ -154,7 +156,7 @@ Try to rollback after a rebase (fail): Rebase with base == '.' => same as no arguments (from 3 onto 8): - $ hg clone -q -u 3 a a2 + $ hg clone -q -u 3 a2heads a2 $ cd a2 $ hg rebase --base . @@ -164,22 +166,18 @@ Rebase with base == '.' => same as no ar saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - @ 8: 'D' - | - o 7: 'C' + @ 6: 'D' | - o 6: 'B' + o 5: 'C' | - o 5: 'I' + o 4: 'B' | - o 4: 'H' + o 3: 'I' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 2: 'H' + | + o 1: 'F' + | o 0: 'A' $ cd .. @@ -220,7 +218,7 @@ Rebase with dest == branch(.) => same as Specify only source (from 2 onto 8): - $ hg clone -q -u . a a4 + $ hg clone -q -u . a2heads a4 $ cd a4 $ hg rebase --source 'desc("C")' @@ -229,20 +227,16 @@ Specify only source (from 2 onto 8): saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) $ hg tglog - o 8: 'D' + o 6: 'D' | - o 7: 'C' - | - @ 6: 'I' + o 5: 'C' | - o 5: 'H' + @ 4: 'I' | - | o 4: 'G' - |/| - o | 3: 'F' - | | - | o 2: 'E' - |/ + o 3: 'H' + | + o 2: 'F' + | | o 1: 'B' |/ o 0: 'A' @@ -285,7 +279,7 @@ Specify only dest (from 3 onto 6): Specify only base (from 1 onto 8): - $ hg clone -q -u . a a6 + $ hg clone -q -u . a2heads a6 $ cd a6 $ hg rebase --base 'desc("D")' @@ -295,22 +289,18 @@ Specify only base (from 1 onto 8): saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-backup.hg (glob) $ hg tglog - o 8: 'D' - | - o 7: 'C' + o 6: 'D' | - o 6: 'B' + o 5: 'C' | - @ 5: 'I' + o 4: 'B' | - o 4: 'H' + @ 3: 'I' | - | o 3: 'G' - |/| - o | 2: 'F' - | | - | o 1: 'E' - |/ + o 2: 'H' + | + o 1: 'F' + | o 0: 'A' $ cd .. @@ -383,7 +373,7 @@ Specify base and dest (from 1 onto 7): Specify only revs (from 2 onto 8) - $ hg clone -q -u . a a9 + $ hg clone -q -u . a2heads a9 $ cd a9 $ hg rebase --rev 'desc("C")::' @@ -392,20 +382,16 @@ Specify only revs (from 2 onto 8) saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-backup.hg (glob) $ hg tglog - o 8: 'D' + o 6: 'D' | - o 7: 'C' - | - @ 6: 'I' + o 5: 'C' | - o 5: 'H' + @ 4: 'I' | - | o 4: 'G' - |/| - o | 3: 'F' - | | - | o 2: 'E' - |/ + o 3: 'H' + | + o 2: 'F' + | | o 1: 'B' |/ o 0: 'A'