Rebase Extension

This extension is distributed along with Mercurial releases (starting with 1.1)

Author: Stefano Tortarolo

1. Configuration

Enable the extension in the configuration file (.hgrc):

[extensions]
rebase = 

Introduction

When contributing to a project, sometimes there is the need to keep some patches private, while keeping the whole repository up-to-date.

In those cases it can be useful to "detach" the local changes, synchronize the repository with the mainstream and then append the private changes on top of the new remote changes. This operation is called rebase.

In general, this extension allows to move revisions from a point to another, some common scenarios are shown in the section "Scenarios".

This feature was implemented as part of the SummerOfCode/2008 RebaseProject.

Tip

Please refer to the RebaseProject for common use cases and detailed information how to use rebase.

1. Features

Usage

1. Synopsis

   hg rebase [--source rev | --base rev] [--dest rev] | [--collapse] | [--continue] | [--abort] | [--keep]

2. Description

3. Integration with pull

Rebase provides an extra option for pull.

   hg pull --rebase

that pulls and rebases the local revisions if there's something to rebase. Otherwise it behaves like hg pull --update.


CategoryExtension