Abstract (was Re: [Google SOC] Rebase command)

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Fri Mar 28 05:57:20 CDT 2008

On Wed, Mar 26, 2008 at 9:10 PM, Stefano <stefano at inventati.org> wrote:
> Hi!
>     I wrote the abstract for my application.
>  Obviously it will result incomplete/incorrect, but I hope it will give you
>  an idea of what I'm going to propose to Google.
>  As usual, don't hesitate to post any advice etc...
>  Thank you
>  Stefano
> Mercurial: Implementation of a rebasing feature – Tortarolo Stefano
>  Abstract
>  I'm going to introduce a feature that allows to move sequence of revisions from
>  one parent revision to another, a so called 'rebasing feature'.

I think a key concept is missing here: You want this to be as
intelligent as possible, meaning it intelligently figures out the
common ancestor for three-way merges and properly handles renames
(like hg's merge).

>  Rebasing can be useful in various situations: for instance, a user, who is
>  developing on a local branch, would like to keep his patches up-to-date with
>  mainline stream. In this case it would be useful if he could be able to move
>  his commits on top of the mainline stream's one.

I would also mention cherry-picking here (see transplant).

>  The implementation will have to take in consideration several aspects, some of
>  them Mercurial related, other regarding Rebasing in general.
>  Mercurial, that is based on the idea of immutable history, doesn't allow
>  revisions to be moved easily, so the simplest rebasing process could be
>  somewhere tricky. It could require to have transient/inconsistent states that
>  will be removed at the end of the process.
>  More in general, a rebasing process could face some issues due to user
>  interruption and/or file conflicts. In the latter case the process will stop
>  and wait for user intervention, so it will be necessary to provide a way to
>  resume an interrupted process; in event of interruption/abortion the repository
>  must be left in a consistent state.

>  Moreover, a rebasing process should check if there are redundant commits (read
>  as 'already applied patches').

I like the idea. Have you thought about it already? Are you going to
check equality of diffs? Do you know what git does exactly?

Otherwise, I concur with the other replies you got.

More information about the Mercurial-devel mailing list