[PATCH STABLE] rebase: fix rebase with no common ancestors (issue4446)

Jordi Gutiérrez Hermoso jordigh at octave.org
Mon Nov 10 13:11:36 CST 2014


On Mon, 2014-11-10 at 10:46 -0800, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at fb.com>
> # Date 1415645082 28800
> #      Mon Nov 10 10:44:42 2014 -0800
> # Node ID 15e6fe3cd01beba4232780cdef715d47cc0b0df5
> # Parent  2d54aa5397cdb1c697673ba10b7618d5ac25c69e
> rebase: fix rebase with no common ancestors (issue4446)

I was working on this, and your fix lgtm. Below I get more picky about
the test you added, but I guess it's ok as it is, if you don't think
it needs anything more.

> --- a/tests/test-rebase-parameters.t
> +++ b/tests/test-rebase-parameters.t
> @@ -468,3 +468,17 @@ Test --tool parameter:
>    [255]
>  
>    $ cd ..
> +
> +No common ancestor
> +
> +  $ hg init separaterepo
> +  $ cd separaterepo
> +  $ touch a
> +  $ hg commit -Aqm a
> +  $ hg up -q null
> +  $ touch b
> +  $ hg commit -Aqm b
> +  $ hg rebase -d 0
> +  nothing to rebase from d7486e00c6f1 to 3903775176ed
> +  [1]
> +  $ cd ..

Should we also test `hg rebase -b` for completeness? Or test anything
that requires more than two commits?





More information about the Mercurial-devel mailing list