Differences between revisions 45 and 46
Revision 45 as of 2011-06-06 15:48:22
Size: 2597
Comment: move to RebaseExtension
Revision 46 as of 2011-06-06 15:49:31
Size: 1349
Comment: was already included in RebaseExtension
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
== Usage ==
=== Synopsis ===
{{{
hg rebase [--source REV | --base REV] [--dest REV] [--collapse] [--detach] [--keep] [--keepbranches] | [--continue] | [--abort]
}}}
=== 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

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

Rebase Project

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 has been implemented as part of SummerOfCode/2008.

Current implementation

The current code can be found here and here (old repository). This project is distributed along with Mercurial release 1.1 as RebaseExtension.

Current version's features:

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


CategoryNewFeatures

RebaseProject (last edited 2012-10-25 20:45:08 by mpm)