SysTutorials

Linux Manual Pages › Section 1

bzr(1)

NAME

bzr – Bazaar next-generation distributed version control

SYNOPSIS

bzr command [ command_options ]
bzr help
bzr help command

DESCRIPTION

Bazaar (or bzr) is a distributed version control system that is powerful, friendly, and scalable. Bazaar is a project of Canonical Ltd and part of the GNU Project to develop a free operating system.

Bazaar keeps track of changes to software source code (or similar information); lets you explore who changed it, when, and why; merges concurrent changes; and helps people work together in a team.

COMMAND OVERVIEW

bzr add [FILE…]
Add specified files or directories.
bzr alias [NAME]
Set/unset and display aliases.
bzr annotate FILENAME
Show the origin of each line in a file.
bzr bind [LOCATION]
Convert the current branch into a checkout of the supplied branch.
bzr branch FROM_LOCATION [TO_LOCATION]
Create a new branch that is a copy of an existing branch.
bzr branches [LOCATION]
List the branches available at the current location.
bzr break-lock [LOCATION]
Break a dead lock.
bzr cat FILENAME
Write the contents of a file as of a given revision to standard output.
bzr check [PATH]
Validate working tree structure, branch consistency and repository history.
bzr checkout [BRANCH_LOCATION] [TO_LOCATION]
Create a new checkout of an existing branch.
bzr clean-tree
Remove unwanted files from working tree.
bzr commit [SELECTED…]
Commit changes into a new revision.
bzr config [NAME]
Display, set or remove a configuration option.
bzr conflicts
List files with conflicts.
bzr deleted
List files deleted in the working tree.
bzr diff [FILE…]
Show differences in the working tree, between revisions or branches.
bzr dpush [LOCATION]
Push into a different VCS without any custom bzr metadata.
bzr export DEST [BRANCH_OR_SUBDIR]
Export current or past revision to a destination directory or archive.
bzr help [TOPIC]
Show help on a command or other topic.
bzr ignore [NAME_PATTERN…]
Ignore specified files or patterns.
bzr ignored
List ignored files and the patterns that matched them.
bzr info [LOCATION]
Show information about a working tree, branch or repository.
bzr init [LOCATION]
Make a directory into a versioned branch.
bzr init-repository LOCATION
Create a shared repository for branches to share storage space.
bzr join TREE
Combine a tree into its containing tree.
bzr log [FILE…]
Show historical log for a branch or subset of a branch.
bzr ls [PATH]
List files in a tree.
bzr merge [LOCATION]
Perform a three-way merge.
bzr missing [OTHER_BRANCH]
Show unmerged/unpulled revisions between two branches.
bzr mkdir DIR…
Create a new versioned directory.
bzr mv [NAMES…]
Move or rename a file.
bzr nick [NICKNAME]
Print or set the branch nickname.
bzr pack [BRANCH_OR_REPO]
Compress the data within a repository.
bzr plugins
List the installed plugins.
bzr pull [LOCATION]
Turn this branch into a mirror of another branch.
bzr push [LOCATION]
Update a mirror of this branch.
bzr reconcile [BRANCH]
Reconcile bzr metadata in a branch.
bzr reconfigure [LOCATION]
Reconfigure the type of a bzr directory.
bzr remerge [FILE…]
Redo a merge.
bzr remove [FILE…]
Remove files or directories.
bzr remove-branch [LOCATION]
Remove a branch.
bzr remove-tree [LOCATION…]
Remove the working tree from a given branch/checkout.
bzr renames [DIR]
Show list of renamed files.
bzr resolve [FILE…]
Mark a conflict as resolved.
bzr revert [FILE…]
Revert files to a previous revision.
bzr revno [LOCATION]
Show current revision number.
bzr root [FILENAME]
Show the tree root directory.
bzr send [SUBMIT_BRANCH] [PUBLIC_BRANCH]
Mail or create a merge-directive for submitting changes.
bzr serve
Run the bzr server.
bzr shelve [FILE…]
Temporarily set aside some changes from the current tree.
bzr sign-my-commits [LOCATION] [COMMITTER]
Sign all commits by a given committer.
bzr split TREE
Split a subdirectory of a tree into a separate tree.
bzr status [FILE…]
Display status summary.
bzr switch [TO_LOCATION]
Set the branch of a checkout and update.
bzr tag [TAG_NAME]
Create, remove or modify a tag naming a revision.
bzr tags
List tags.
bzr testament [BRANCH]
Show testament (signing-form) of a revision.
bzr unbind
Convert the current checkout into a regular branch.
bzr uncommit [LOCATION]
Remove the last committed revision.
bzr unshelve [SHELF_ID]
Restore shelved changes.
bzr update [DIR]
Update a working tree to a new revision.
bzr upgrade [URL]
Upgrade a repository, branch or working tree to a newer format.
bzr verify-signatures [LOCATION]
Verify all commit signatures.
bzr version
Show version of bzr.
bzr version-info [LOCATION]
Show version information about this tree.
bzr view [FILE…]
Manage filtered views.
bzr whoami [NAME]
Show or set bzr user id.

COMMAND REFERENCE

bzr –help

Alias for "help", see "bzr help".

bzr -?

Alias for "help", see "bzr help".

bzr -h

Alias for "help", see "bzr help".

bzr ?

Alias for "help", see "bzr help".

bzr add [FILE…]

Options:
 –dry-run                 Show what would be done, but don’t
                        actually do anything.
 –file-ids-from ARG       Lookup file ids from this tree.
 –help, -h                Show help message.
 –no-recurse              Don’t recursively add the contents of
                        directories.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: ignore, remove

Add specified files or directories.

In non-recursive mode, all the named items are added, regardless of whether they were previously ignored. A warning is given if any of the named files are already versioned.

In recursive mode (the default), files are treated the same way but the behaviour for directories is different. Directories that are already versioned do not give a warning. All directories, whether already versioned or not, are searched for files or subdirectories that are neither versioned or ignored, and these are added. This search proceeds recursively into versioned directories. If no names are given ‘.’ is assumed.

A warning will be printed when nested trees are encountered, unless they are explicitly ignored.

Therefore simply saying ‘bzr add’ will version all files that are currently unknown.

Adding a file whose parent directory is not versioned will implicitly add the parent, and so on up to the root. This means you should never need to explicitly add a directory, they’ll just get added when you add a file in the directory.

–dry-run will show which files would be added, but not actually add them.

–file-ids-from will try to use the file ids from the supplied path. It looks up ids trying to find a matching parent directory with the same filename, and then by pure path. This option is rarely needed but can be useful when adding the same logical file into two branches that will be merged later (without showing the two different adds as a conflict). It is also useful when merging another project into a subdirectory of this one.

Any files matching patterns in the ignore list will not be added unless they are explicitly mentioned.

In recursive mode, files larger than the configuration option add.maximum_file_size will be skipped. Named items are never skipped due to file size.

bzr alias [NAME]

Options:
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –remove                  Remove the alias.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Set/unset and display aliases.

Examples:
 Show the current aliases:

  bzr alias

 Show the alias specified for ‘ll’:

  bzr alias ll

 Set an alias for ‘ll’:

  bzr alias ll="log –line -r-10..-1"

 To remove an alias for ‘ll’:

  bzr alias –remove ll

bzr ann

Alias for "annotate", see "bzr annotate".

bzr annotate FILENAME

Options:
 –all                     Show annotations on all lines.
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –long                    Show commit date in annotations.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –show-ids                Show internal object ids.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Aliases: ann, blame, praise

Show the origin of each line in a file.

This prints out the given file with an annotation on the left side indicating which revision, author and date introduced the change.

If the origin is the same for a run of consecutive lines, it is shown only at the top, unless the –all option is given.

bzr bind [LOCATION]

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: checkouts, unbind

Convert the current branch into a checkout of the supplied branch. If no branch is supplied, rebind to the last bound location.

Once converted into a checkout, commits must succeed on the master branch before they will be applied to the local branch.

Bound branches use the nickname of its master branch unless it is set locally, in which case binding will update the local nickname to be that of the master.

bzr blame

Alias for "annotate", see "bzr annotate".

bzr branch FROM_LOCATION [TO_LOCATION]

Options:
 –bind                    Bind new branch to from location.
 –files-from ARG          Get file contents from this tree.
 –hardlink                Hard-link working tree files where
                        possible.
 –help, -h                Show help message.
 –no-tree                 Create a branch without a working-tree.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –stacked                 Create a stacked branch referring to the
                        source branch. The new branch will
                        depend on the availability of the source
                        branch for all operations.
 –standalone              Do not use a shared repository, even if
                        available.
 –switch                  Switch the checkout in the current
                        directory to the new branch.
 –usage                   Show usage message and options.
 –use-existing-dir        By default branch will fail if the
                        target directory exists, but does not
                        already have a control directory.  This
                        flag will allow branch to proceed.
 –verbose, -v             Display more information.

Aliases: get, clone

See also: checkout

Create a new branch that is a copy of an existing branch.

If the TO_LOCATION is omitted, the last component of the FROM_LOCATION will be used. In other words, "branch ../foo/bar" will attempt to create ./bar. If the FROM_LOCATION has no / or path separator embedded, the TO_LOCATION is derived from the FROM_LOCATION by stripping a leading scheme or drive identifier, if any. For example, "branch lp:foo-bar" will attempt to create ./foo-bar.

To retrieve the branch as of a particular revision, supply the –revision parameter, as in "branch foo/bar -r 5".

The synonyms ‘clone’ and ‘get’ for this command are deprecated.

bzr branches [LOCATION]

Options:
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –recursive, -R           Recursively scan for branches rather
                        than just looking in the specified
                        location.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

List the branches available at the current location.

This command will print the names of all the branches at the current location.

bzr break-lock [LOCATION]

Options:
 –config                  LOCATION is the directory where the
                        config lock is.
 –force                   Do not ask for confirmation before
                        breaking the lock.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Break a dead lock.

This command breaks a lock on a repository, branch, working directory or config file.

CAUTION: Locks should only be broken when you are sure that the process holding the lock has been stopped.

You can get information on what locks are open via the ‘bzr info [location]’ command.

Examples:
 bzr break-lock
 bzr break-lock bzr+ssh://example.com/bzr/foo
 bzr break-lock –conf ~/.bazaar

bzr cat FILENAME

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –filters                 Apply content filters to display the
                        convenience form.
 –help, -h                Show help message.
 –name-from-revision      The path name in the old tree.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: ls

Write the contents of a file as of a given revision to standard output.

If no revision is nominated, the last revision is used.

Note: Take care to redirect standard output when using this command on a binary file.

bzr check [PATH]

Options:
 –branch                  Check the branch related to the current
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –repo                    Check the repository related to the
                        current directory.
 –tree                    Check the working tree related to the
                        current directory.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: reconcile

Validate working tree structure, branch consistency and repository history.

This command checks various invariants about branch and repository storage to detect data corruption or bzr bugs.

The working tree and branch checks will only give output if a problem is detected. The output fields of the repository check are:

revisions
 This is just the number of revisions checked.  It doesn’t
 indicate a problem.

versionedfiles
 This is just the number of versionedfiles checked.  It
 doesn’t indicate a problem.

unreferenced ancestors
 Texts that are ancestors of other texts, but
 are not properly referenced by the revision ancestry.  This is a
 subtle problem that Bazaar can work around.

unique file texts
 This is the total number of unique file contents
 seen in the checked revisions.  It does not indicate a problem.

repeated file texts
 This is the total number of repeated texts seen
 in the checked revisions.  Texts can be repeated when their file
 entries are modified, but the file contents are not.  It does not
 indicate a problem.

If no restrictions are specified, all Bazaar data that is found at the given location will be checked.

Examples:

 Check the tree and branch at ‘foo’:

  bzr check –tree –branch foo

 Check only the repository at ‘bar’:

  bzr check –repo bar

 Check everything at ‘baz’:

  bzr check baz

bzr checkin

Alias for "commit", see "bzr commit".

bzr checkout [BRANCH_LOCATION] [TO_LOCATION]

Options:
 –files-from ARG          Get file contents from this tree.
 –hardlink                Hard-link working tree files where
                        possible.
 –help, -h                Show help message.
 –lightweight             Perform a lightweight checkout.
                        Lightweight checkouts depend on access
                        to the branch for every operation.
                        Normal checkouts can perform common
                        operations like diff and status without
                        such access, and also support local
                        commits.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Alias: co

See also: branch, checkouts

Create a new checkout of an existing branch.

If BRANCH_LOCATION is omitted, checkout will reconstitute a working tree for the branch found in ‘.’. This is useful if you have removed the working tree or if it was never created – i.e. if you pushed the branch to its current location using SFTP.

If the TO_LOCATION is omitted, the last component of the BRANCH_LOCATION will be used. In other words, "checkout ../foo/bar" will attempt to create ./bar. If the BRANCH_LOCATION has no / or path separator embedded, the TO_LOCATION is derived from the BRANCH_LOCATION by stripping a leading scheme or drive identifier, if any. For example, "checkout lp:foo-bar" will attempt to create ./foo-bar.

To retrieve the branch as of a particular revision, supply the –revision parameter, as in "checkout foo/bar -r 5". Note that this will be immediately out of date [so you cannot commit] but it may be useful (i.e. to examine old code.)

bzr ci

Alias for "commit", see "bzr commit".

bzr clean-tree

Options:
 –detritus                Delete conflict files, merge and revert
                        backups, and failed selftest dirs.
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –dry-run                 Show files to delete instead of deleting
                        them.
 –force                   Do not prompt before deleting.
 –help, -h                Show help message.
 –ignored                 Delete all ignored files.
 –quiet, -q               Only display errors and warnings.
 –unknown                 Delete files unknown to bzr (default).
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Remove unwanted files from working tree.

By default, only unknown files, not ignored files, are deleted. Versioned files are never deleted.

Another class is ‘detritus’, which includes files emitted by bzr during normal operations and selftests. (The value of these files decreases with time.)

If no options are specified, unknown files are deleted. Otherwise, option flags are respected, and may be combined.

To check what clean-tree will do, use –dry-run.

bzr clone

Alias for "branch", see "bzr branch".

bzr co

Alias for "checkout", see "bzr checkout".

bzr commit [SELECTED…]

Options:
 –author ARG              Set the author’s name, if it’s different
                        from the committer.
 –commit-time ARG         Manually set a commit time using commit
                        date format, e.g. ‘2009-10-10 08:00:00
                        +0100′.
 –exclude ARG, -x         Do not consider changes made to a given
                        path.
 –file MSGFILE, -F        Take commit message from this file.
 –fixes ARG               Mark a bug as being fixed by this
                        revision (see "bzr help bugs").
 –help, -h                Show help message.
 –local                   Perform a local commit in a bound
                        branch.  Local commits are not pushed to
                        the master branch until a normal commit
                        is performed.
 –lossy                   When committing to a foreign version
                        control system do not push data that can
                        not be natively represented.
 –message ARG, -m         Description of the new revision.
 –quiet, -q               Only display errors and warnings.
 –show-diff, -p           When no message is supplied, show the
                        diff along with the status summary in
                        the message editor.
 –strict                  Refuse to commit if there are unknown
                        files in the working tree.
 –unchanged               Commit even if nothing has changed.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Aliases: ci, checkin

See also: add, bugs, hooks, uncommit

Commit changes into a new revision.

An explanatory message needs to be given for each commit. This is often done by using the –message option (getting the message from the command line) or by using the –file option (getting the message from a file). If neither of these options is given, an editor is opened for the user to enter the message. To see the changed files in the boilerplate text loaded into the editor, use the –show-diff option.

By default, the entire tree is committed and the person doing the commit is assumed to be the author. These defaults can be overridden as explained below.

Selective commits:

  If selected files are specified, only changes to those files are
  committed.  If a directory is specified then the directory and
  everything within it is committed.

  When excludes are given, they take precedence over selected files.
  For example, to commit only changes within foo, but not changes
  within foo/bar:

 bzr commit foo -x foo/bar

  A selective commit after a merge is not yet supported.

Custom authors:

  If the author of the change is not the same person as the committer,
  you can specify the author’s name using the –author option. The
  name should be in the same format as a committer-id, e.g.
  "John Doe <jdoe [at] example.com>". If there is more than one author of
  the change you can specify the option multiple times, once for each
  author.

Checks:

  A common mistake is to forget to add a new file or directory before
  running the commit command. The –strict option checks for unknown
  files and aborts the commit if any are found. More advanced pre-commit
  checks can be implemented by defining hooks. See “bzr help hooks“
  for details.

Things to note:

  If you accidentially commit the wrong changes or make a spelling
  mistake in the commit message say, you can use the uncommit command
  to undo it. See “bzr help uncommit“ for details.

  Hooks can also be configured to run after a commit. This allows you
  to trigger updates to external systems like bug trackers. The –fixes
  option can be used to record the association between a revision and
  one or more bugs. See “bzr help bugs“ for details.

bzr config [NAME]

Options:
 –all                     Display all the defined values for the
                        matching options.
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –remove                  Remove the option from the configuration
                        file.
 –scope ARG               Reduce the scope to the specified
                        configuration file.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: configuration

Display, set or remove a configuration option.

Display the active value for a given option.

If –all is specified, NAME is interpreted as a regular expression and all matching options are displayed mentioning their scope. The active value that bzr will take into account is the first one displayed for each option.

If no NAME is given, –all .* is implied.

Setting a value is achieved by using name=value without spaces. The value is set in the most relevant scope and can be checked by displaying the option again.

bzr conflicts

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –text                    List paths of files with text conflicts.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: conflict-types, resolve

List files with conflicts.

Merge will do its best to combine the changes in two branches, but there are some kinds of problems only a human can fix. When it encounters those, it will mark a conflict. A conflict means that you need to fix something, before you can commit.

Conflicts normally are listed as short, human-readable messages. If –text is supplied, the pathnames of files with text conflicts are listed, instead. (This is useful for editing all files with text conflicts.)

Use bzr resolve when you have fixed a problem.

bzr del

Alias for "remove", see "bzr remove".

bzr deleted

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –show-ids                Show internal object ids.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: ls, status

List files deleted in the working tree.
 

bzr di

Alias for "diff", see "bzr diff".

bzr dif

Alias for "diff", see "bzr diff".

bzr diff [FILE…]

Options:
 –change ARG, -c          Select changes introduced by the
                        specified revision. See also "help
                        revisionspec".
 –diff-options ARG        Pass these options to the external diff
                        program.
 –format ARG, -F          Diff format to use.
 –help, -h                Show help message.
 –new ARG                 Branch/tree to compare to.
 –old ARG                 Branch/tree to compare from.
 –prefix ARG, -p          Set prefixes added to old and new
                        filenames, as two values separated by a
                        colon. (eg "old/:new/").
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –usage                   Show usage message and options.
 –using ARG               Use this command to compare files.
 –verbose, -v             Display more information.

Aliases: di, dif

See also: status

Show differences in the working tree, between revisions or branches.

If no arguments are given, all changes for the current tree are listed. If files are given, only the changes in those files are listed. Remote and multiple branches can be compared by using the –old and –new options. If not provided, the default for both is derived from the first argument, if any, or the current tree if no arguments are given.

"bzr diff -p1" is equivalent to "bzr diff –prefix old/:new/", and produces patches suitable for "patch -p1".

Note that when using the -r argument with a range of revisions, the differences are computed between the two specified revisions. That is, the command does not show the changes introduced by the first revision in the range. This differs from the interpretation of revision ranges used by "bzr log" which includes the first revision in the range.

Exit values:
 1 – changed
 2 – unrepresentable changes
 3 – error
 0 – no change

Examples:
 Shows the difference in the working tree versus the last commit:

  bzr diff

 Difference between the working tree and revision 1:

  bzr diff -r1

 Difference between revision 3 and revision 1:

  bzr diff -r1..3

 Difference between revision 3 and revision 1 for branch xxx:

  bzr diff -r1..3 xxx

 The changes introduced by revision 2 (equivalent to -r1..2):

  bzr diff -c2

 To see the changes introduced by revision X:
 
  bzr diff -cX

 Note that in the case of a merge, the -c option shows the changes
 compared to the left hand parent. To see the changes against
 another parent, use:

  bzr diff -r<chosen_parent>..X

 The changes between the current revision and the previous revision
 (equivalent to -c-1 and -r-2..-1)

  bzr diff -r-2..

 Show just the differences for file NEWS:

  bzr diff NEWS

 Show the differences in working tree xxx for file NEWS:

  bzr diff xxx/NEWS

 Show the differences from branch xxx to this working tree:

  bzr diff –old xxx

 Show the differences between two branches for file NEWS:

  bzr diff –old xxx –new yyy NEWS

 Same as ‘bzr diff’ but prefix paths with old/ and new/:

  bzr diff –prefix old/:new/
  
 Show the differences using a custom diff program with options:
 
  bzr diff –using /usr/bin/diff –diff-options -wu

bzr dpush [LOCATION]

Options:
 –directory ARG, -d       Branch to push from, rather than the one
                        containing the working directory.
 –help, -h                Show help message.
 –no-rebase               Do not rebase after push.
 –quiet, -q               Only display errors and warnings.
 –remember                Remember the specified location as a
                        default.
 –strict                  Refuse to push if there are uncommitted
                        changes in the working tree, –no-strict
                        disables the check.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Push into a different VCS without any custom bzr metadata.

This will afterwards rebase the local branch on the remote branch unless the –no-rebase option is used, in which case the two branches will be out of sync after the push.

bzr export DEST [BRANCH_OR_SUBDIR]

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –filters                 Apply content filters to export the
                        convenient form.
 –format ARG              Type of file to export to.
 –help, -h                Show help message.
 –per-file-timestamps     Set modification time of files to that
                        of the last revision in which it was
                        changed.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –root ARG                Name of the root directory inside the
                        exported file.
 –uncommitted             Export the working tree contents rather
                        than that of the last revision.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Export current or past revision to a destination directory or archive.

If no revision is specified this exports the last committed revision.

Format may be an "exporter" name, such as tar, tgz, tbz2. If none is given, try to find the format with the extension. If no extension is found exports to a directory (equivalent to –format=dir).

If root is supplied, it will be used as the root directory inside container formats (tar, zip, etc). If it is not supplied it will default to the exported filename. The root option has no effect for ‘dir’ format.

If branch is omitted then the branch containing the current working directory will be used.

Note: Export of tree with non-ASCII filenames to zip is not supported.

  =================       =========================
  Supported formats       Autodetected by extension
  =================       =========================
  dir                         (none)
  tar                          .tar
  tbz2                    .tar.bz2, .tbz2
  tgz                      .tar.gz, .tgz
  zip                          .zip
  =================       =========================

bzr get

Alias for "branch", see "bzr branch".

bzr help [TOPIC]

Options:
 –help, -h                Show help message.
 –long                    Show help on all commands.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Aliases: ?, –help, -?, -h

See also: topics

Show help on a command or other topic.
 

bzr ignore [NAME_PATTERN…]

Options:
 –default-rules           Display the default ignore rules that
                        bzr uses.
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: ignored, patterns, status

Ignore specified files or patterns.

See “bzr help patterns“ for details on the syntax of patterns.

If a .bzrignore file does not exist, the ignore command will create one and add the specified files or patterns to the newly created file. The ignore command will also automatically add the the use of the ignore command will require an explicit add command.

To remove patterns from the ignore list, edit the .bzrignore file. After adding, editing or deleting that file either indirectly by using this command or directly by using an editor, be sure to commit it.

Bazaar also supports a global ignore file ~/.bazaar/ignore. On Windows the global ignore file can be found in the application data directory as C:\Documents and Settings\<user>\Application Data\Bazaar\2.0\ignore. Global ignores are not touched by this command. The global ignore file can be edited directly using an editor.

Patterns prefixed with ‘!’ are exceptions to ignore patterns and take precedence over regular ignores. Such exceptions are used to specify files that should be versioned which would otherwise be ignored.

Patterns prefixed with ‘!!’ act as regular ignore patterns, but have precedence over the ‘!’ exception patterns.

Notes:
  * Ignore patterns containing shell wildcards must be quoted from
  the shell on Unix.

* Ignore patterns starting with "#" act as comments in the ignore file.
  To ignore patterns that begin with that character, use the "RE:" prefix.

Examples:
 Ignore the top level Makefile:

  bzr ignore ./Makefile

 Ignore .class files in all directories…:

  bzr ignore "*.class"

 …but do not ignore "special.class":

  bzr ignore "!special.class"

 Ignore files whose name begins with the "#" character:

  bzr ignore "RE:^#"

 Ignore .o files under the lib directory:

  bzr ignore "lib/**/*.o"

 Ignore .o files under the lib directory:

  bzr ignore "RE:lib/.*\.o"

 Ignore everything but the "debian" toplevel directory:

  bzr ignore "RE:(?!debian/).*"
 
 Ignore everything except the "local" toplevel directory,
 but always ignore autosave files ending in ~, even under local/:
 
  bzr ignore "*"
  bzr ignore "!./local"
  bzr ignore "!!*~"

bzr ignored

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: ignore, ls

List ignored files and the patterns that matched them.

List all the ignored files and the ignore pattern that caused the file to be ignored.

Alternatively, to list just the files:

 bzr ls –ignored

bzr info [LOCATION]

Options:
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: repositories, revno, working-trees

Show information about a working tree, branch or repository.

This command will show all known locations and formats associated to the tree, branch or repository.

In verbose mode, statistical information is included with each report. To see extended statistic information, use a verbosity level of 2 or higher by specifying the verbose option multiple times, e.g. -vv.

Branches and working trees will also report any missing revisions.

Examples:

  Display information on the format and related locations:

 bzr info

  Display the above together with extended format information and
  basic statistics (like the number of files in the working tree and
  number of revisions in the branch and repository):

 bzr info -v

  Display the above together with number of committers to the branch:

 bzr info -vv

bzr init [LOCATION]

Options:
 –append-revisions-only   Never change revnos or the existing log.
                        Append revisions to it only.
 –create-prefix           Create the path leading up to the branch
                        if it does not already exist.
 –format ARG              Specify a format for this branch. See
                        "help formats".
 –2a                      Format for the bzr 2.0 series. Uses
                        group-compress storage. Provides rich
                        roots which are a one-way transition.
 –default                 Format for the bzr 2.0 series. Uses
                        group-compress storage. Provides rich
                        roots which are a one-way transition.
 –development-colo        The 2a format with experimental support
                        for colocated branches.
 –pack-0.92               Pack-based format used in 1.x series.
                        Introduced in 0.92. Interoperates with
                        bzr repositories before 0.92 but cannot
                        be read by bzr < 0.92.
 –help, -h                Show help message.
 –no-tree                 Create a branch without a working tree.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: branch, checkout, init-repository

Make a directory into a versioned branch.

Use this to create an empty branch, or before importing an existing project.

If there is a repository in a parent directory of the location, then the history of the branch will be stored in the repository. Otherwise init creates a standalone branch which carries its own history in the .bzr directory.

If there is already a branch at the location but it has no working tree, the tree can be populated with ‘bzr checkout’.

Recipe for importing a tree of files:

 cd ~/project
 bzr init
 bzr add .
 bzr status
 bzr commit -m "imported project"

bzr init-repo

Alias for "init-repository", see "bzr init-repository".

bzr init-repository LOCATION

Options:
 –format ARG              Specify a format for this repository.
                        See "bzr help formats" for details.
 –2a                      Format for the bzr 2.0 series. Uses
                        group-compress storage. Provides rich
                        roots which are a one-way transition.
 –default                 Format for the bzr 2.0 series. Uses
                        group-compress storage. Provides rich
                        roots which are a one-way transition.
 –development-colo        The 2a format with experimental support
                        for colocated branches.
 –pack-0.92               Pack-based format used in 1.x series.
                        Introduced in 0.92. Interoperates with
                        bzr repositories before 0.92 but cannot
                        be read by bzr < 0.92.
 –help, -h                Show help message.
 –no-trees                Branches in the repository will default
                        to not having a working tree.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

Alias: init-repo

See also: branch, checkout, init, repositories

Create a shared repository for branches to share storage space.

New branches created under the repository directory will store their revisions in the repository, not in the branch directory. For branches with shared history, this reduces the amount of storage needed and speeds up the creation of new branches.

If the –no-trees option is given then the branches in the repository will not have working trees by default. They will still exist as directories on disk, but they will not have separate copies of the files at a certain revision. This can be useful for repositories that store branches which are interacted with through checkouts or remote branches, such as on a server.

Examples:
 Create a shared repository holding just branches:

  bzr init-repo –no-trees repo
  bzr init repo/trunk

 Make a lightweight checkout elsewhere:

  bzr checkout –lightweight repo/trunk trunk-checkout
  cd trunk-checkout
  (add files here)

bzr join TREE

Options:
 –help, -h                Show help message.
 –quiet, -q               Only display errors and warnings.
 –usage                   Show usage message and options.
 –verbose, -v             Display more information.

See also: split

Combine a tree into its containing tree.

This command requires the target tree to be in a rich-root format.

The TREE argument should be an independent tree, inside another tree, but not part of it. (Such trees can be produced by "bzr split", but also by running "bzr branch" with the target inside a tree.)

The result is a combined tree, with the subtree no longer an independent part. This is marked as a merge of the subtree into the containing tree, and all history is preserved.

bzr log [FILE…]

Options:
 –authors ARG             What names to list as authors – first,
                        all or committer.
 –change ARG, -c          Show just the specified revision. See
                        also "help revisionspec".
 –exclude-common-ancestry Display only the revisions that are not
                        part of both ancestries (require
                        -rX..Y).
 –forward                 Show from oldest to newest.
 –help, -h                Show help message.
 –include-merged          Show merged revisions like –levels 0
                        does.
 –levels N, -n            Number of levels to display – 0 for all,
                        1 for flat.
 –limit N, -l             Limit the output to the first N
                        revisions.
 –log-format ARG          Use specified log format.
 –gnu-changelog           Format used by GNU ChangeLog files.
 –line                    Log format with one line per revision.
 –long                    Detailed log format.
 –short                   Moderately short log format.
 –match ARG, -m           Show revisions whose properties match
                        this expression.
 –match-author ARG        Show revisions whose authors match this
                        expression.
 –match-bugs ARG          Show revisions whose bugs match this
                        expression.
 –match-committer ARG     Show revisions whose committer matches
                        this expression.
 –match-message ARG       Show revisions whose message matches
                        this expression.
 –omit-merges             Do not report commits with more than one
                        parent.
 –quiet, -q               Only display errors and warnings.
 –revision ARG, -r        See "help revisionspec" for details.
 –show-diff, -p           Show changes made in each revision as a
                        patch.
 –show-ids                Show internal object ids.
 –signatures              Show digital signature validity.
 –timezone ARG            Display timezone as local, original, or
                        utc.
 –usage                   Show usage message and options.
 –verbose, -v             Show files changed in each revision.

See also: log-formats, revisionspec

Show historical log for a branch or subset of a branch.

log is bzr’s default tool for exploring the history of a branch. The branch to use is taken from the first parameter. If no parameters are given, the branch containing the working directory is logged. Here are some simple examples:

  bzr log                       log the current branch
  bzr log foo.py                log a file in its branch
  bzr log http://server/branch  log a branch on a server

The filtering, ordering and information shown for each revision can be controlled as explained below. By default, all revisions are shown sorted (topologically) so that newer revisions appear before older ones and descendants always appear before ancestors. If displayed, merged revisions are shown indented under the revision in which they were merged.

Output control:

  The log format controls how information about each revision is
  displayed. The standard log formats are called “long“, “short“
  and “line“. The default is long. See “bzr help log-formats“
  for more details on log formats.

  The following options can be used to control what information is
  displayed:

 -l N        display a maximum of N revisions
 -n N        display N levels of revisions (0 for all, 1 for collapsed)
 -v          display a status summary (delta) for each revision
 -p          display a diff (patch) for each revision
 –show-ids  display revision-ids (and file-ids), not just revnos

  Note that the default number of levels to display is a function of the
  log format. If the -n option is not used, the standard log formats show
  just the top level (mainline).

  Status summaries are shown using status flags like A, M, etc. To see
  the changes explained using words like “added“ and “modified“
  instead, use the -vv option.

Ordering control:

  To display revisions from oldest to newest, use the –forward option.
  In most cases, using this option will have little impact on the total
  time taken to produce a log, though –forward does not incrementally
  display revisions like –reverse does when it can.

Revision filtering:

  The -r option can be used to specify what revision or range of revisions
  to filter against. The various forms are shown below:

 -rX      display revision X
 -rX..    display revision X and later
 -r..Y    display up to and including revision Y
 -rX..Y   display from X to Y inclusive

  See “bzr help revisionspec“ for details on how to specify X and Y.
  Some common examples are given below:

 -r-1                show just the tip
 -r-10..             show the last 10 mainline revisions
 -rsubmit:..         show what’s new on this branch
 -rancestor:path..   show changes since the common ancestor of this
                  branch and the one at location path
 -rdate:yesterday..  show changes since yesterday

  When logging a range of revisions using -rX..Y, log starts at
  revision Y and searches back in history through the primary
  ("left-hand") parents until it finds X. When logging just the
  top level (using -n1), an error is reported if X is not found
  along the way. If multi-level logging is used (-n0), X may be
  a nested merge revision and the log will be truncated accordingly.

Path filtering:

  If parameters are given and the first one is not a branch, the log
  will be filtered to show only those revisions that changed the
  nominated files or directories.

  Filenames are interpreted within their historical context. To log a
  deleted file, specify a revision range so that the file existed at
  the end or start of the range.

  Historical context is also important when interpreting pathnames of
  renamed files/directories. Consider the following example:

  * revision 1: add tutorial.txt
  * revision 2: modify tutorial.txt
  * revision 3: rename tutorial.txt to guide.txt; add tutorial.txt

  In this case:

  * “bzr log guide.txt“ will log the file added in revision 1

  * “bzr log tutorial.txt“ will log the new file added in revision 3

  * “bzr log -r2 -p tutorial.txt“ will show the changes made to
 the original file in revision 2.

  * “bzr log -r2 -p guide.txt“ will display an error message as there
 was no file called guide.txt in revision 2.

  Renames are always followed by log. By design, there is no need to
  explicitly ask for this (and no way to stop logging a file back
  until it was last renamed).

Other filtering:

  The –match option can be used for finding revisions that match a
  regular expression in a commit message, committer, author or bug.
  Specifying the option several times will match any of the supplied
  expressions. –match-author, –match-bugs, –match-committer and
  –match-message can be used to only match a specific field.

Tips & tricks:

  GUI tools and IDEs are often better at exploring history than command
  line tools: you may prefer qlog or viz from qbzr or bzr-gtk, the
  bzr-explorer shell, or the Loggerhead web interface.  See the Plugin
  Guide <http://doc.bazaar.canonical.com/plugins/en/> and
  <http://wiki.bazaar.canonical.com/IDEIntegration>.  

  You may find it useful to add the aliases below to “bazaar.conf“:

 [ALIASES]
 tip = log -r-1
 top = log -l10 –line
 show = log -v -p

  “bzr tip“ will then show the latest revision while “bzr top“
  will show the last 10 mainline revisions. To see the details of a
  particular revision X,  “bzr show -rX“.

  If you are interested in looking deeper into a particular merge X,
  use “bzr log -n0 -rX“.

  “bzr log -v“ on a branch with lots of history is currently
  very slow. A fix for this issue is currently under development.
  With or without that fix, it is recommended that a revision range
  be given when using the -v option.

  bzr has a generic full-text matching plugin, bzr-search, that can be
  used to find revisions matching user names, commit messages, etc.
  Among other features, this plugin can find all revisions containing
  a list of words but not others.

  When exploring non-mainline history on large projects with deep
  history, the performance of log can be greatly improved by installing
  the historycache plugin. This plugin buffers historical information
  trading disk space for faster speed.

bzr ls [PATH]

Options:
 –directory ARG, -d       Branch to operate on, instead of working
                        directory.
 –from-root               Print paths relative to the root of the
                        branch.
 –help, -h                Show help message.
 –ignored, -i             Print ignored files.
 –kind ARG, -k            List entries of a particular kind: file,
                        directory, symlink.
 –null, -0                Use an ASCII NUL (