Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2009-05-19 19:30:55
Size: 714
Editor: localhost
Comment: converted to 1.6 markup
Revision 7 as of 2009-08-05 08:28:52
Size: 2441
Editor: Max Hofer
Comment: Removed redundant (broken) information located in rebase project, linked rebase extension to rebase project and fixed broken link to SoC 2008
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:

See RebaseProject for usage details.

The rebase extension is currently (as of 2008-08-20) available from the tip of the main development branch of Mercurial and is thus contained in the [[http://www.selenic.com/mercurial-snapshot.tar.gz|hourly snapshot]].

The rebase extension is '''not''' compatible with Mercurial release 1.0.2 (see http://www.selenic.com/pipermail/mercurial/2008-September/021154.html).
Line 18: Line 12:
hgext.rebase = rebase =
Line 20: Line 14:

== 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.

{{{#!wiki tip
'''Tip'''

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

=== 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 ==
=== Synopsis ===
{{{
   hg rebase [--source rev | --base rev] [--dest rev] | [--collapse] | [--continue] | [--abort] | [--keep]
}}}

=== 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

=== 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.

== Related links ==
 * RebaseProject
 * RebasePlan
 * [[http://code.google.com/soc/2008/hg/appinfo.html?csaid=EC7D811E53CA98EF|GSoC's Abstract ]]

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] | [--continue] | [--abort] | [--keep]

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

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

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