[PATCH 3 of 3] rebase: shift all states constant by one

Mads Kiilerich mads at kiilerich.com
Tue Dec 2 19:05:53 CST 2014


On 12/02/2014 09:32 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1417551939 28800
> #      Tue Dec 02 12:25:39 2014 -0800
> # Node ID 4dbdc7f27f3a78ae719d5f9826c6245c4b48734e
> # Parent  627b344d81f64444216dc0ac7cfc33d63d7fcdff
> rebase: shift all states constant by one
>
> This make 'revtoto' not overlapping with nullrev anymore. As a side effect it

revtodo

> a rebase started with 3.2 and resumed with 3.3 will get confused.

Starting with 3.3 and continuing with older versions will also misbehave.

> So I'm not sure this change a is good idea.

Agreed, it shouldn't be applied, but it has value as proof.

> The fact is pass tests "proves" all relevant place are using the right variable.

Agreed. Nice catch with the "negative state update back" fix that made 
it less dependent of revtodo==nullrev.

IMO, if you want to make revtodo independent from nullrev and just have 
it as an arbitrary enum without any secret traps or hidden dependencies, 
then the dependency on the ordering of the constants should be removed too.

/Mads


More information about the Mercurial-devel mailing list