Mercurial > hg-stable
changeset 28101:79437fb352ce
tests: add an explicit destination in some rebase tests
As we will make 'rebase' behave more like 'merge', it will no longer pick
'max(branch(.))' as the default destination. We have to hard code the expected
destination is multiple tests where it matters. After a careful inspection none
of theses tests really cares about the default destination behavior and just
omitted one out of laziness.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 08 Feb 2016 14:03:45 +0100 |
parents | ab382192337a |
children | bd74b5e0d2c0 |
files | tests/test-rebase-bookmarks.t tests/test-rebase-collapse.t tests/test-rebase-parameters.t |
diffstat | 3 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-rebase-bookmarks.t Mon Feb 08 14:02:53 2016 +0100 +++ b/tests/test-rebase-bookmarks.t Mon Feb 08 14:03:45 2016 +0100 @@ -167,7 +167,7 @@ created new head $ hg up 3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg rebase + $ hg rebase --dest 4 rebasing 3:3d5fa227f4b5 "C" (Y Z) merging c warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
--- a/tests/test-rebase-collapse.t Mon Feb 08 14:02:53 2016 +0100 +++ b/tests/test-rebase-collapse.t Mon Feb 08 14:03:45 2016 +0100 @@ -58,7 +58,7 @@ > echo "====" > echo "edited manually" >> \$1 > EOF - $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e + $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7 rebasing 1:42ccdea3bb16 "B" rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" @@ -115,7 +115,7 @@ $ cd a2 $ hg phase --force --secret 6 - $ hg rebase --source 4 --collapse + $ hg rebase --source 4 --collapse --dest 7 rebasing 4:9520eea781bc "E" rebasing 6:eea13746799a "G" saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob) @@ -157,7 +157,7 @@ > env | grep HGEDITFORM > true > EOF - $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e + $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7 rebasing 4:9520eea781bc "E" rebasing 6:eea13746799a "G" HGEDITFORM=rebase.collapse @@ -261,13 +261,13 @@ $ hg clone -q -u . b b1 $ cd b1 - $ hg rebase -s 2 --collapse + $ hg rebase -s 2 --dest 7 --collapse abort: unable to collapse on top of 7, there is more than one external parent: 1, 5 [255] Rebase and collapse - E onto H: - $ hg rebase -s 4 --collapse # root (4) is not a merge + $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge rebasing 4:8a5212ebc852 "E" rebasing 5:7f219660301f "F" rebasing 6:c772a8b2dc17 "G" @@ -418,7 +418,7 @@ $ hg clone -q -u . c c1 $ cd c1 - $ hg rebase -s 4 --collapse # root (4) is not a merge + $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge rebasing 4:8a5212ebc852 "E" rebasing 5:dca5924bb570 "F" merging E @@ -512,7 +512,7 @@ $ hg clone -q -u . d d1 $ cd d1 - $ hg rebase -s 1 --collapse + $ hg rebase -s 1 --collapse --dest 5 rebasing 1:27547f69f254 "B" rebasing 2:f838bfaca5c7 "C" rebasing 3:7bbcd6078bcc "D"
--- a/tests/test-rebase-parameters.t Mon Feb 08 14:02:53 2016 +0100 +++ b/tests/test-rebase-parameters.t Mon Feb 08 14:03:45 2016 +0100 @@ -82,33 +82,33 @@ abort: cannot specify both a revision and a base [255] - $ hg rebase --rev '1 & !1' + $ hg rebase --rev '1 & !1' --dest 8 empty "rev" revision set - nothing to rebase [1] - $ hg rebase --source '1 & !1' + $ hg rebase --source '1 & !1' --dest 8 empty "source" revision set - nothing to rebase [1] - $ hg rebase --base '1 & !1' + $ hg rebase --base '1 & !1' --dest 8 empty "base" revision set - can't compute rebase set [1] - $ hg rebase + $ hg rebase --dest 8 nothing to rebase - working directory parent is also destination [1] - $ hg rebase -b. + $ hg rebase -b . --dest 8 nothing to rebase - e7ec4e813ba6 is both "base" and destination [1] $ hg up -q 7 - $ hg rebase --traceback + $ hg rebase --dest 8 --traceback nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 [1] - $ hg rebase -b. + $ hg rebase --dest 8 -b. nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 [1] @@ -402,7 +402,7 @@ $ hg clone -q -u . a aX $ cd aX - $ hg rebase -r 3 -r 6 + $ hg rebase -r 3 -r 6 --dest 8 rebasing 3:32af7686d403 "D" rebasing 6:eea13746799a "G" saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-backup.hg (glob)