Differences between revisions 9 and 10
Revision 9 as of 2010-08-28 15:16:10
Size: 2641
Editor: abuehl
Comment:
Revision 10 as of 2011-05-23 13:56:07
Size: 2773
Comment: Added link to RebaseIfExtension
Deletions are marked like this. Additions are marked like this.
Line 88: Line 88:
 * RebaseIfExtension - A separate (unbundled) extension that only rebases if there are no conflicted files, otherwise does a merge

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

  • rebase both simple and complex cases
  • abort of an interrupted rebasing
  • resume of an interrupted rebasing
  • mq patches handling
  • detect changes during interruptions

Usage

1. Synopsis

   hg rebase [--source REV | --base REV] [--dest REV] [--collapse] [--detach] [--keep] [--keepbranches] | [--continue] | [--abort]

2. Description

  • --source rev

    • allows to specify a revision that will be rebased onto dest with all its descendants
  • --base rev

    • the revision specified will be rebased along with its descendants and its ancestors up to the common point (excluded) between rev and dest's ancestors

      Note that this option conflicts with --source

  • --dest rev

    • the destination onto which the required revisions will be rebased
  • --continue

    • resume an interrupted rebase
  • --abort

    • abort an interrupted rebase
  • --collapse

    • collapse the rebased revisions
  • --keep

    • keep original revisions
  • --keepbranches

    • keep original branch names
  • --detach (development version only)

    • force detaching of source from its original branch

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.


CategoryBundledExtension

RebaseExtension (last edited 2017-03-28 19:44:56 by SietseBrouwer)