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'. 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. 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').