Patchwork [2,of,2,V2] rebase: explicitly test abort from ambiguous destination

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 20, 2016, 2:30 p.m.
Message ID <9ade84f34fbe5ff91be0.1455978652@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/13272/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Pierre-Yves David - Feb. 20, 2016, 2:30 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1454936837 -3600
#      Mon Feb 08 14:07:17 2016 +0100
# Node ID 9ade84f34fbe5ff91be07e242b11d8e7166f57eb
# Parent  9ab9ff92f70edc9dd0f95204b74e3f69c97d0c1b
# EXP-Topic destination
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 9ade84f34fbe
rebase: explicitly test abort from ambiguous destination

We want to explicitly test the next behavior. We add this test in its own
changeset to make the test change from the behavior change as clean as possible.

Patch

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
@@ -80,10 +80,15 @@  These fail:
   [255]
   $ hg rebase --base 5 --rev 4
   abort: cannot specify both a revision and a base
   [255]
 
+  $ hg rebase --base 6
+  abort: branch 'default' has 3 heads - please rebase to an explicit rev
+  (run 'hg heads .' to see heads)
+  [255]
+
   $ hg rebase --rev '1 & !1' --dest 8
   empty "rev" revision set - nothing to rebase
   [1]
 
   $ hg rebase --source '1 & !1' --dest 8