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

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 15, 2016, 10:49 a.m.
Message ID <49ed8d341616f9e23bf1.1455533356@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/13195/
State Superseded
Delegated to: Yuya Nishihara
Headers show

Comments

Pierre-Yves David - Feb. 15, 2016, 10:49 a.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 49ed8d341616f9e23bf1fa1cc0bdfb7d9333ec96
# Parent  1b45c38d02ddca7ff763366e732528c658ccb13c
# EXP-Topic destination
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 49ed8d341616
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.
Sean Farley - Feb. 16, 2016, 9:46 p.m.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> writes:

> # 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 49ed8d341616f9e23bf1fa1cc0bdfb7d9333ec96
> # Parent  1b45c38d02ddca7ff763366e732528c658ccb13c
> # EXP-Topic destination
> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 49ed8d341616
> 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.

I like the direction of all this update-destination work. These patches
look like a good step in that direction.

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