rewrite - Rewrite history by replaying patches

Version 0.6.2dev
Branch lp:bzr-rewrite
Home page https://launchpad.net/bzr-rewrite
Owner jelmer
GNU/Linux Yes
Windows Yes
Mac OS X Yes

Rebase support.

The Bazaar rebase plugin adds support for rebasing branches to Bazaar. It adds the command ‘rebase’ to Bazaar. When conflicts occur when replaying patches, the user can resolve the conflict and continue the rebase using the ‘rebase-continue’ command or abort using the ‘rebase-abort’ command.

rebase

Purpose

Re-base a branch.

Usage

bzr rebase [UPSTREAM_LOCATION]

Options

--dry-run Show what would be done, but don’t actually do anything.
-v, --verbose Display more information.
--pending-merges
 Rebase pending merges onto local branch.
-h, --help Show help message.
-q, --quiet Only display errors and warnings.
-d ARG, --directory=ARG
 Branch to replay onto, rather than the one containing the working directory.
--usage Show usage message and options.
--onto=ARG Different revision to replay onto.
--always-rebase-merges
 Don’t skip revisions that merge already present revisions.
-r ARG, --revision=ARG
 See “help revisionspec” for details.
Merge algorithm:
--merge-type=ARG
 Select a particular merge algorithm.
--diff3 Merge using external diff3
--lca LCA-newness merge
--merge3 Native diff3-style merge
--weave Weave-based merge

Description

Rebasing is the process of taking a branch and modifying the history so that it appears to start from a different point. This can be useful to clean up the history before submitting your changes. The tree at the end of the process will be the same as if you had merged the other branch, but the history will be different.

The command takes the location of another branch on to which the branch in the specified directory (by default, the current working directory) will be rebased. If a branch is not specified then the parent branch is used, and this is usually the desired result.

The first step identifies the revisions that are in the current branch that are not in the parent branch. The current branch is then set to be at the same revision as the target branch, and each revision is replayed on top of the branch. At the end of the process it will appear as though your current branch was branched off the current last revision of the target.

Each revision that is replayed may cause conflicts in the tree. If this happens the command will stop and allow you to fix them up. Resolve the commits as you would for a merge, and then run ‘bzr resolve’ to marked them as resolved. Once you have resolved all the conflicts you should run ‘bzr rebase-continue’ to continue the rebase operation.

If conflicts are encountered and you decide that you do not wish to continue you can run ‘bzr rebase-abort’.

The ‘–onto’ option allows you to specify a different revision in the target branch to start at when replaying the revisions. This means that you can change the point at which the current branch will appear to be branched from when the operation completes.

rebase-abort

Purpose

Abort an interrupted rebase.

Usage

bzr rebase-abort

Options

--usage Show usage message and options.
-d ARG, --directory=ARG
 Branch to replay onto, rather than the one containing the working directory.
-v, --verbose Display more information.
-q, --quiet Only display errors and warnings.
-h, --help Show help message.

rebase-continue

Purpose

Continue an interrupted rebase after resolving conflicts.

Usage

bzr rebase-continue

Options

-v, --verbose Display more information.
-q, --quiet Only display errors and warnings.
-d ARG, --directory=ARG
 Branch to replay onto, rather than the one containing the working directory.
--usage Show usage message and options.
-h, --help Show help message.
Merge algorithm:
--merge-type=ARG
 Select a particular merge algorithm.
--diff3 Merge using external diff3
--lca LCA-newness merge
--merge3 Native diff3-style merge
--weave Weave-based merge

rebase-foreign

Purpose

Rebase revisions based on a branch created with a different import tool.

Usage

bzr rebase-foreign [NEW_BASE]

Options

-v, --verbose Display more information.
-q, --quiet Only display errors and warnings.
-d ARG, --directory=ARG
 Branch to replay onto, rather than the one containing the working directory.
--idmap-file=ARG
 Write map with old and new revision ids.
--usage Show usage message and options.
-h, --help Show help message.

Description

This will change the identity of revisions whose parents were mapped from revisions in the other version control system.

You are recommended to run “bzr check” in the local repository after running this command.

rebase-todo

Purpose

Print list of revisions that still need to be replayed as part of the

Usage

bzr rebase-todo

Options

--usage Show usage message and options.
-d ARG, --directory=ARG
 Branch to replay onto, rather than the one containing the working directory.
-v, --verbose Display more information.
-q, --quiet Only display errors and warnings.
-h, --help Show help message.

Description

current rebase operation.