Size: 553
Comment:
|
Size: 2641
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
'''This extension is expected to be distributed along with Mercurial releases''' | '''This extension is distributed along with Mercurial releases (starting with 1.1)''' |
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]. |
|
Line 16: | Line 12: |
hgext.rebase = | rebase = |
Line 19: | Line 15: |
== 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] [--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. == Related links == * RebaseProject * RebasePlan * [[http://code.google.com/soc/2008/hg/appinfo.html?csaid=EC7D811E53CA98EF|GSoC's Abstract ]] |
|
Line 20: | Line 89: |
CategoryExtension | CategoryBundledExtension |
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
- 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
--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.