baz (1) - Linux Manuals
baz: arch command line client tool
NAME
baz - arch command line client toolSYNOPSIS
baz command [ command_options ]baz command [-h|--help|-H]
baz [-h|--help|-H|-V|--version]
DESCRIPTION
baz is an implementation of arch.arch is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, when, and why changes occurred, etc., like SVN, CVS, or RCS.
arch
has a number of advantages compared to competing systems. Among these are:
Works on Whole Trees
arch keeps track of whole trees -- not just individual files. For example, if you change many files in a tree, arch can record all of those changes as a group rather than file-by-file; if you rename files or reorganize a tree, arch can record those tree arrangements along with your changes to file contents.Changeset Oriented
arch doesn't simply "snapshot" your project trees. Instead, arch associates each revision with a particular changeset: a description of exactly what has changed. arch provides changeset oriented commands to help you review changesets, merge trees by applying changesets, examine the history of a tree by asking what changesets have been applied to it, and so forth.Fully Distributed
arch doesn't rely on a central repository. For example, there is no need to give write access to a project's archive to all significant contributors. Instead, each contributor can have their own archive for their work. arch seamlessly operates across archive boundaries.COMMAND OVERVIEW
Help
- baz help [options]
-
provide help with arch
User Commands
- baz my-id [options] [id]
-
print or change your id
- baz my-default-archive [options] [archive]
-
print or change your default archive
- baz register-archive [options] [-d name] location
-
change an archive location registration
- baz whereis-archive [options] archive
-
print an archive location registration
- baz archives [options] [search regular expression]
-
report registered archives and their locations
- baz upgrade [options]
-
perform an upgrade of local baz settings and data.
Project Tree Commands
- baz annotate [options] [path ...]
-
display the changesets that last modified lines in the tree
- baz diff [options] [revision] [-- limit...]
-
report about local changes in a project tree
- baz init-tree [options] [[archive]/version]
-
initialize a new project tree
- baz tree-id [options] [dir]
-
Print the tree identifier for a project tree->
- baz tree-root [options] [dir]
-
find and print the root of a project tree
- baz tree-version [options] [NEW VERSION]
-
Print the default version for a project tree
- baz set-tree-version [options] [...]
-
This command has been removed; you can use 'baz tree-version <version>' instead.
- baz undo [options] [revision] [-- file ...]
-
undo and save changes in a project tree
- baz redo [options] [changeset]
-
redo changes in project tree
- baz file-diff [options] file [revision]
-
show local changes to a file
- baz switch [options] [package]
-
change the working trees version to that of package
Project Tree Inventory Commands
- baz inventory [options] [dir]*
-
inventory a source tree
- baz status [options] [dir]
-
scan a project tree and show the tree status.
- baz lint [options] [dir]
-
audit a source tree
- baz resolved [options] FILE [FILE ...]
-
Tell bazaar one or more tree problems have been resolved
- baz id [options] file ...
-
report the inventory id for a file
- baz id-tagging-method [options] [method]
-
print or change a project tree id tagging method
- baz add-id [options] file ...
-
add an explicit inventory id
- baz delete-id [options] file ...
-
remove an explicit inventory id
- baz rm [options] file...
-
remove a file (or dir, or symlink) and its explicit inventory tag (if any)
- baz move-id [options] from to
-
move an explicit inventory id
- baz mv [options] from to OR from1 from2 ... dir
-
move a file (or dir, or symlink) and its explicit inventory tag (if any)
- baz explicit-default [options] [TAG-PREFIX]
-
print or modify default ids
- baz id-tagging-defaults [options]
-
print the default =tagging-method contents
- baz inode-sig [options] [dir]
-
output the inode signature for a source tree.
Patch Set Commands
- baz changeset [options] ORIG MOD DEST [files]
-
compute a whole-tree changeset
- baz apply-changeset [options] CHANGESET [TARGET]
-
apply a whole-tree changeset
- baz show-changeset [options] [dir]
-
generate a report from a changeset
Archive Transaction Commands
- baz make-archive [options] [name] location
-
create a new archive directory
- baz import [options] [[archive]/version]
-
archive a full-source base-0 revision
- baz export [options] [revision] [dir]
-
export all or some of a tree revision
- baz commit [options] [file ...]
-
archive a changeset-based revision
- baz get [options] revision [dir]
-
construct a project tree for a revision
- baz get-changeset [options] revision [dir]
-
retrieve a changeset from an archive
- baz lock-revision [options] VERSION|REVISION
-
lock (or unlock) an archive revision
- baz archive-mirror [options] [from [to] [limit]]
-
update an archive mirror
Archive Commands
- baz abrowse [options] [limit]
-
print an outline describing archive contents
- baz rbrowse [options] [[ARCHIVE_NAME/]LIMIT_REGEX]
-
print an outline describing an archive's contents
- baz categories [options] [archive]
-
list the categories in an archive
- baz branches [options] [[archive/]category]
-
list the branches in an archive category
- baz versions [options] [branch]
-
list the versions in an archive branch
- baz revisions [options] [[archive/]version]
-
list the revisions in an archive version
- baz ancestry [options] [revision]
-
display the ancestory of a revision
- baz ancestry-graph [options] [revision]
-
display the ancestory of a revision
- baz change-archive [options] archivename|URL
-
Alter properties of an archive. For instance, add signatures to an unsigned archive.
- baz cat-archive-log [options] revision
-
print the contents of an archived log entry
- baz cacherev [options] [ARCHIVE/[PACKAGE[--VERSION[--PATCHLEVEL]]]] or [PATCHLEVEL]
-
cache a full source tree in an archive
- baz cachedrevs [options] [version]
-
list cached revisions in an archive
- baz uncacherev [options] revision [dir]
-
remove a cached full source tree from an archive
- baz archive-meta-info [options] [archive/]item-name
-
report meta-info from an archive
- baz archive-snapshot [options] dir [[archive/]limit]
-
update an archive snapshot
- baz archive-version [options] [archive]
-
list the archive-version in an archive
- baz archive-fixup [options] [archive]
-
fix ancillary files (e.g. .listing files) in an archive
Patch Log Commands
- baz make-log [options] [version]
-
initialize a new log file entry
- baz log-versions [options]
-
list patch log versions in a project tree
- baz add-log-version [options] [archive]/version
-
add a patch log version to a project tree
- baz remove-log-version [options] [archive]/version
-
remove a version's patch log from a project tree
- baz log [-f|--full] [-r start[:end]]
-
Show the log messages for the working directory or given
- baz logs [options] [[archive]/version ...]
-
list patch logs for a version in a project tree
- baz cat-log [options] revision-spec
-
print the contents of a project tree log entry
- baz changelog [options] [[archive]/version]
-
generate a ChangeLog from a patch log
- baz log-for-merge [options] [[archive]/version]
-
generate a log entry body for a merge
- baz merges [options] INTO [FROM]
-
report where two branches have been merged
- baz new-merges [options] [[archive]/version]
-
list tree patches new to a version
Multi-project Configuration Commands
- baz build-config [options] config
-
instantiate a multi-project config
- baz cat-config [options] config
-
output information about a multi-project config
Commands for Branching and Merging
- baz branch [options] [SOURCE] BRANCH
-
create a branch
- baz merge [options] [FROM]
-
merge from another branch
- baz update [options] [version/revision]
-
update a project tree to reflect recent archived changes
- baz replay [options] [version/revision...]
-
apply revision changesets to a project tree
- baz apply-delta [options] FROM(REVISION|DIR) TO(REVISION|DIR)
-
compute a changeset between any two trees or revisions and apply it to a project tree
- baz missing [options] [version]
-
print patches missing from a project tree
- baz join-branch [options] version
-
add a version as an ancestor of a project tree
- baz sync-tree [options] revision
-
unify a project tree's patch-log with a given revision
- baz delta [options] (REVISION|TREE)-A (REVISION|TREE)-B [DESTDIR]
-
compute a changeset (or diff) between any two trees or revisions
Local Cache Commands
- baz file-find [options] file [revision]
-
find given version of file
- baz pristines [options] [limit]
-
list pristine trees in a project tree
- baz add-pristine [options] revision
-
ensure that a project tree has a particular pristine revision
- baz find-pristine [options] revision
-
find and print the path to a pristine revision
Revision Library Commands
- baz my-revision-library [options] [dir]
-
print or change your revision library path
- baz library-config [options] library-dir
-
configure parameters of a revision library
- baz library-find [options] revision
-
find and print the location of a revision in the revision library
- baz library-add [options] revision
-
add a revision to the revision library
- baz library-remove [options] revision
-
remove a revision from the revision library
- baz library-archives [options]
-
list the archives in your revision library
- baz library-categories [options] [archive]
-
list the categories in your revision library
- baz library-branches [options] [category]
-
list the branches in a library category
- baz library-versions [options] [branch]
-
list the versions in a library branch
- baz library-revisions [options] [version]
-
list the revisions in a library version
- baz library-log [options] revision
-
output a log message from the revision library
- baz library-file [options] file revision
-
find a file in a revision library
Cache Commands
- baz cache-config [options] [dir]
-
Print or change your cache settings
Published Revisions Commands
- baz grab [options] location
-
grab a published revision
Miscellaneous Scripting Support
- baz parse-package-name [options] name
-
parse a package name
- baz valid-package-name [options] name
-
test a package name for validity
- baz escape [--unescaped] string
-
print strings in escaped or unescaped form
HELP
baz help
provide help with archUsage: baz help [options]
This command prints a list of the available commands.
To see just a list of the options to a particular command, use:
(where $cmd is the name of the command). For additional explanation about a given command, use:
USER COMMANDS
baz my-id
print or change your idUsage: baz my-id [options] [id]
With no argument print your arch id.
With an argument, record ID-STRING as your id in ~/.arch-params/=id
Your id is recorded in various archives and log messages as you use arch. It must consist entirely of printable characters and fit on one line. By convention, it should have the form of an email address, as in this example:
The portion of an id string between < and > is called your uid. arch sometimes uses your uid as a fragment when generating unique file names.
The option -u (--uid) causes only the uid part of your id string to be printed.
baz my-default-archive
print or change your default archiveUsage: baz my-default-archive [options] [archive]
With no argument, and without -d, print the name of your default archive.
With an argument, record ARCHIVE as your default archive in ~/.arch-params/=default-archive
With the option -d (--delete) and no argument, ensure that you do not have a default archive set in ~/.arch-params.
Your default archive is determined this way:
If the option -A (--archive) is given and not empty, that archive is the default (which makes this script useful for processing a -A argument that was passed to another script).
If -A is not given, but ~/.arch-params/=default-archive exists and is not empty, that is your default archive.
Otherwise, your default archive is the name of the local archive rooted at the argument to -R (--root) or specified in the environment variable ARCHROOT.
If no default archive can be found by any of these means, the program exits with status 1, printing an error message unless the -s (--silent) option is given.
baz register-archive
change an archive location registrationUsage: baz register-archive [options] [-d name] location
Record the location of ARCHIVE.
With -d, remove the registration of a previously registered archive. When accompanied by -f, override permissions on the registration file and don't complain if the archive is not registered. If you are deleting a location that is inaccesible, you may provide the name of the archive that the location belongs to This may not be provided when registering an archive: inaccessible archives may not be registered.
A LOCATION should be either a directory name or a distant URL.
When registering a new archive, then the archive's name will be read automatically from the archive's meta data.
Archive locations are stored in ~/.arch-params/archives/ARCHIVENAME.
Registering archives is optional. If you use a url to a command, the archive will be automatically registered.
baz whereis-archive
print an archive location registrationUsage: baz whereis-archive [options] archive
Print the registered location of an archive.
Usually the archive must have been previously registered with "baz register-archive".
As a special exception, the the archive is not registered, but is the name of the archive rooted at the location given with the option -R (--root) or in the environment variable ARCHROOT then print that root directory.
baz archives
report registered archives and their locationsUsage: baz archives [options] [search regular expression]
Print a list of registered archives and their locations
If [search regex] is given then only archives with names that match [search regex] will be shown
baz upgrade
perform an upgrade of local baz settings and data.Usage: baz upgrade [options]
By default, nothing is done. You must supply --move-old-config (recommended) or --leave-old-config
For baz 1.3 this: Scans all the archives listed in ~/.arch-params/=locations and writes consolidated configuration details to ~/.arch-params/archives. After upgrading, the previous configuration details are saved in ~/.arch-params/upgraded-by-baz-1.3/
If an archive cannot be connected to, its configuration details are left untouched
PROJECT TREE COMMANDS
baz annotate
display the changesets that last modified lines in the treeUsage: baz annotate [options] [path ...]
baz diff
report about local changes in a project treeUsage: baz diff [options] [revision] [-- limit...]
Generate a patch report describing the differences between the current project tree (or DIR if it is supplied) and the project trees current revision (or REVISION if supplied).
baz init-tree
initialize a new project treeUsage: baz init-tree [options] [[archive]/version]
Initialize DIR as a new project tree.
An empty patch-log for VERSION will be created, and VERSION will be made the default location for check-ins.
baz tree-id
Print the tree identifier for a project tree->Usage: baz tree-id [options] [dir]
Print the patchset identifier that represents the current tree-> I.e. foo [at] example.com/demo--1.0--patch-4. Defaults to the tree the current directory is in.
baz tree-root
find and print the root of a project treeUsage: baz tree-root [options] [dir]
Find and print the root of the project tree that contains DIR (or the current directory). The option --accurate checks for three possibilities:
In case 1, exit with an error and error message.
In case 2, install the log file before printing the tree root and exiting normally.
In case 3, print the tree root and exit normally.
baz tree-version
Print the default version for a project treeUsage: baz tree-version [options] [NEW VERSION]
Print the default version of project tree DIR (or the current directory).
(Advanced Usage) If [NEW VERSION] is given, then the version of the working tree is changed to the supplied one
baz set-tree-version
This command has been removed; you can use 'baz tree-version <version>' instead.Usage: baz set-tree-version [options] [...]
baz undo
undo and save changes in a project treeUsage: baz undo [options] [revision] [-- file ...]
Compute a patch set describing the changes from REVISION to the project tree containing DIR. Save the patch in PATCH-DIR (which must not already exist) and apply the patch in reverse to the project tree containing DIR.
The effect is to remove local changes in the DIR project tree but save them in a convenient form.
If REVISION is not specified, the latest ancestor of the default version of project tree is used.
If REVISION is specified as a VERSION, the latest ancestor of the project tree in that VERSION is used.
If DIR is not specified, "." is assumed.
If PATCH-DIR is not specified, a temporary file-name of the matching ,,undo-* is used.
If --no-output is specified, the patch set is not saved.
See also "baz redo -H" and "baz diff -H".
baz redo
redo changes in project treeUsage: baz redo [options] [changeset]
Apply CHANGESET to the project tree and then delete CHANGESET.
If CHANGESET is not specified, the highest numbered ,,undo-N directory in the project tree root is used.
If --keep is given, the changeset directory is not deleted.
See also "baz undo --help" and "baz apply-changeset --help".
baz file-diff
show local changes to a fileUsage: baz file-diff [options] file [revision]
Print diffs between FILE and the corresponding file in a cached copy of REVISION.
The default patch level for a given version is the latest level for which the project tree has a patch. The default archive and version is as printed by "baz tree-version".
baz switch
change the working trees version to that of packageUsage: baz switch [options] [package]
change the working trees version to that of package, and make equivalent to revision. Preserves uncommitted changes.
Note: baz automatically switches to the _latest_ revision in the supplied version.
PROJECT TREE INVENTORY COMMANDS
baz inventory
inventory a source treeUsage: baz inventory [options] [dir]*
With no arguments, print a human-readable inventory report.
With category options (--source etc) limit the report to just those files. With no other options, the report includes all sections and files.
The options -d, -f, and -b cancel each other.
The options --nested and --no-recursion cancel each other.
If a directory is precious, junk, or unrecognized, only the directory name itself is printed -- its contents are not searched.
baz status
scan a project tree and show the tree status.Usage: baz status [options] [dir]
Audit a source tree for various changes, the characters in the first column mean: C - conflicts R - renames A - adds D - deletes P - permissions ? - unexpected files By default, changes will report the status for everything within a tree. Specific changes may be ignored by passing options to the changes command
Note: If conflicts have occurred, when you have resolved them, notify baz by run baz resolved --all
baz lint
audit a source treeUsage: baz lint [options] [dir]
Audit a source tree for missing files, untagged files, duplicate ids, and files not matching recognized naming conventions.
The default is to list files failing any of those tests. Enabling any of the `specific' tests disables the rest, unless they're explicitly enabled on the command line. Therefore, "lint" is equivalent to "lint -sutmd"
baz resolved
Tell bazaar one or more tree problems have been resolvedUsage: baz resolved [options] FILE [FILE ...]
This command is used to tell bazaar that one or more tree problems has been solved. In this version of bazaar, --all is equivalent to --rejects
baz id
report the inventory id for a fileUsage: baz id [options] file ...
Print a file's inventory id.
baz id-tagging-method
print or change a project tree id tagging methodUsage: baz id-tagging-method [options] [method]
Print or change the method by which source files are identified in DIR (or the current directory).
When setting, METHOD must be one of:
When printing, if --strict is provided but no id tagging method is explicitly set, print an error.
baz add-id
add an explicit inventory idUsage: baz add-id [options] file ...
Create an explicit inventory id for FILE (which may be a regular file, symbolic link, or directory).
baz delete-id
remove an explicit inventory idUsage: baz delete-id [options] file ...
Remove an explicit inventory id for FILE (which may be a regular file, symbolic link, or directory).
baz rm
remove a file (or dir, or symlink) and its explicit inventory tag (if any)Usage: baz rm [options] file...
baz move-id
move an explicit inventory idUsage: baz move-id [options] from to
Move an explicit inventory id for FILE (which may be a regular file or symbolic link but which must not be a directory).
baz mv
move a file (or dir, or symlink) and its explicit inventory tag (if any)Usage: baz mv [options] from to OR from1 from2 ... dir
This command is suitable as a replacement for mv(1) within any baz tree for any move operation, regardless of id tagging method.
baz explicit-default
print or modify default idsUsage: baz explicit-default [options] [TAG-PREFIX]
For files in this directory, use:
as the default explicit id for all files in this directory that do not have an explicit explicit id.
With no arguments, print the previously set ID-PREFIX.
By default, this command sets, prints or deletes a "strong default" -- a default explicit id which overrides implicit ids.
With --weak, set (or print) a weak default id which is overridden by explicit ids.
The --dont-care option sets (or with -d, clears) a flag for that directory that causes unidged files not to be reported as such in "baz lint" reports.
baz id-tagging-defaults
print the default =tagging-method contentsUsage: baz id-tagging-defaults [options]
Print the boilerplate contents that are used to initialize new =tagging-method files.
baz inode-sig
output the inode signature for a source tree.Usage: baz inode-sig [options] [dir]
PATCH SET COMMANDS
baz changeset
compute a whole-tree changesetUsage: baz changeset [options] ORIG MOD DEST [files]
Compares the source trees ORIG and MOD, and produces a changeset tree in DEST, which must not already exist.
See also "baz apply-changeset -H".
baz apply-changeset
apply a whole-tree changesetUsage: baz apply-changeset [options] CHANGESET [TARGET]
Apply the changeset CHANGESET to the source tree TARGET (default `.').
See also "baz changeset -H".
baz show-changeset
generate a report from a changesetUsage: baz show-changeset [options] [dir]
Produce a human-readable summary of a changeset.
ARCHIVE TRANSACTION COMMANDS
baz make-archive
create a new archive directoryUsage: baz make-archive [options] [name] location
NAME is the global name for the archive. It must be an email address with a fully qualified domain name, optionally followed by "--" and a string of letters, digits, periods and dashes.
With --mirror, label the new archive as a mirror of MASTER. Ordinary commits can not be made to a mirror archive, however the command "baz archive-mirror" can write to a mirror.
Two special forms of this command are available:
baz make-archive --mirror MASTER LOCATION
is equivalent to:
baz make-archive --mirror MASTER MASTER-MIRROR LOCATION
and thus "baz archive-mirror MASTER" will push changes from MASTER to the newly created mirror.
baz make-archive --mirror-from MASTER-SOURCE LOCATION
is equivalent to:
baz make-archive --mirror MASTER-SOURCE MASTER LOCATION
and thus "baz archive-mirror MASTER" will pull changes from MASTER-SOURCE to the newly created mirror.
The first of these two special forms is especially handy when creating a remote mirror in which to publish a local repository.
The second special form is handy when creating a local mirror of a remote archive, locally bound to the remote archive's name.
The --tla option creates a tla format archive, the default is to create a Bazaar archive.
baz import
archive a full-source base-0 revisionUsage: baz import [options] [[archive]/version]
Archive a from-scratch base revision of the tree DIR (or the current directory). Use this command to create the first revision of a new project.
If --log-message is specified without --summary, then TEXT is used both as the summary and the first line of the log body.
baz export
export all or some of a tree revisionUsage: baz export [options] [revision] [dir]
Extract REVISION from an archive, creating a new source tree with no control information.
baz commit
archive a changeset-based revisionUsage: baz commit [options] [file ...]
Archive a revision of the project tree containing DIR (or the current directory)
If there are any automated ChangeLog files, update them before computing the patch set.
If --log-message is specified without --summary, then TEXT is used both as the summary and the first line of the log body.
baz get
construct a project tree for a revisionUsage: baz get [options] revision [dir]
Extract REVISION from an archive, creating the new project tree DIR. If DIR is not specified, store the working copy in a subdirectory of the current directory, giving it the name of the revision. CAUTION: when using the links option be sure to use copy-on-write on your editor or the revision library will be corrupted. Either way, the project tree must not already exist.
baz get-changeset
retrieve a changeset from an archiveUsage: baz get-changeset [options] revision [dir]
Retrieve the changeset for REVISION and store it in the directory DIR (or a directory named REVISION.patches). DIR must not already exist.
baz lock-revision
lock (or unlock) an archive revisionUsage: baz lock-revision [options] VERSION|REVISION
Acquire the lock needed to create REVISION.
Revision must be the next patch-level in sequence, however, if no patch level is specified, the revision is automatically calculated
baz archive-mirror
update an archive mirrorUsage: baz archive-mirror [options] [from [to] [limit]]
If no arguments are given, update either the archive for the project tree you are in, or your `my-default-archive'-MIRROR archive with the contents of `my-default-archive'.
If a [FROM] archive is given, update the [FROM]-MIRROR archive with the contents of the [FROM] archive
If both [FROM] and [TO] archives are specified, update [TO] with the contents of [FROM]
If LIMIT is provided, it should be a category, branch, version, or revision name. Only the indicated part of FROM will be copied to TO. If LIMIT is a revision, then cached revisions will be copied and deleted to TO.
(see "baz make-archive -H".).
ARCHIVE COMMANDS
baz abrowse
print an outline describing archive contentsUsage: baz abrowse [options] [limit]
Describe the contents of an archive in outline format.
With LIMIT, look only that part of the archive.
LIMIT may be a fully qualified name and may be an archive name.
baz rbrowse
print an outline describing an archive's contentsUsage: baz rbrowse [options] [[ARCHIVE_NAME/]LIMIT_REGEX]
an outline of an archive will be printed, showing the categories, branches and revisions of the specified archive if no archive is given then `my-default-archive` is used.
If [LIMIT REGEX] is specified, revisions will only be shown if the category, branch or version matches [LIMIT REGEX]. If --patch-regex [REGEX] is given, then only patchlogs matching [REGEX] will be given
baz categories
list the categories in an archiveUsage: baz categories [options] [archive]
Print a list of the categories present in an archive.
baz branches
list the branches in an archive categoryUsage: baz branches [options] [[archive/]category]
Print a list of the branches within CATEGORY
baz versions
list the versions in an archive branchUsage: baz versions [options] [branch]
Print a list of versions within an archive branch.
The list is ordinarily sorted from oldest to newest, but the order can be changed with -r (--reverse).
baz revisions
list the revisions in an archive versionUsage: baz revisions [options] [[archive/]version]
Print a list of revisions within an archive version.
The list is ordinarily sorted from oldest to newest, but the order can be changed with -r (--reverse).
With optional arguments specifying patches, list only those patches, if they exist. If a listed patch does not exist, exit with status 1. The -r (--reverse) flag has no effect with optional arguments.
baz ancestry
display the ancestory of a revisionUsage: baz ancestry [options] [revision]
Print the ancestry of a revision.
baz ancestry-graph
display the ancestory of a revisionUsage: baz ancestry-graph [options] [revision]
Print a list describing the ancestry of a revision.
baz change-archive
Alter properties of an archive. For instance, add signatures to an unsigned archive.Usage: baz change-archive [options] archivename|URL
The following operations involve making a temporary mirror of the archive: - adding signatures - removing signatures - changing the archive format They may take some time as they involve a full mirror of the archive and all its contents The following operations will automatically propogate their changes to all writeable mirrors listed in ~/.arch-params/archives/NAME, and must have the master archive available to operate at all: - adding signatures - removing signatures
baz cat-archive-log
print the contents of an archived log entryUsage: baz cat-archive-log [options] revision
Retrieve and print the log message for the indicated revision from its archive.
baz cacherev
cache a full source tree in an archiveUsage: baz cacherev [options] [ARCHIVE/[PACKAGE[--VERSION[--PATCHLEVEL]]]] or [PATCHLEVEL]
Cache a full-text copy of the indicated revision in the archive. This can speed up subsequent calls to "baz get" for that and subsequent revisions.
If no nothing is specified, but the command is run from within a project tree, cache the latest revision in the default version of that tree.
baz cachedrevs
list cached revisions in an archiveUsage: baz cachedrevs [options] [version]
Report which revisions of VERSION have been cached as whole trees in the archive.
See also "baz cacherev -H".
baz uncacherev
remove a cached full source tree from an archiveUsage: baz uncacherev [options] revision [dir]
Remove the cached form of REVISION from its archive.
If REVISION is not specified, but the command is run from within a project tree, uncache the latest revision in the default version of that tree.
Also see "baz cacherev -H".
baz archive-meta-info
report meta-info from an archiveUsage: baz archive-meta-info [options] [archive/]item-name
Print the contents of a meta-info file from an archive. For example,
prints the official name of your default archive.
baz archive-snapshot
update an archive snapshotUsage: baz archive-snapshot [options] dir [[archive/]limit]
Update the directory DIR with a "snapshot" of of an archive (or the part of the archive indicated by LIMIT
For each archive snapshotted, DIR will contain a file and subdirectory (where $ARCH is the name of the archive):
Similarly, for each category snapshotted, DIR will contain:
and so on, recursively, for branches and versions.
For each revision, the snapshot contains:
and that file contains a copy of the patch log entry for that revision.
Snapshots can be used in combination with other tools ('make' is suggested) to trigger one-time events in response to new additions to an archive.
baz archive-version
list the archive-version in an archiveUsage: baz archive-version [options] [archive]
Print the archive format identifier string of an arch archive.
baz archive-fixup
fix ancillary files (e.g. .listing files) in an archiveUsage: baz archive-fixup [options] [archive]
This is a kind of "catch-all" command to fix the non-standard, non-transactional state of an archive. Currently its sole function is to repair .listing files in archives that use them.
PATCH LOG COMMANDS
baz make-log
initialize a new log file entryUsage: baz make-log [options] [version]
Create (if needed) a log entry file in the root of the project tree containing DIR, for the indicated VERSION.
The name of the new log file is printed to standard output.
baz log-versions
list patch log versions in a project treeUsage: baz log-versions [options]
Print the list of versions for which there are patch logs in the project tree containing DIR (or the current directory).
baz add-log-version
add a patch log version to a project treeUsage: baz add-log-version [options] [archive]/version
Add an initially empty list of patch log for VERSION to the project tree containing DIR (or the current directory).
A project tree patch log is a pre-requisite for checking the directory in on that version, or updating with patches from that version.
Note that versions recorded for a project tree are recorded by fully qualified version names: an archive name plus the name of a version within that archive.
baz remove-log-version
remove a version's patch log from a project treeUsage: baz remove-log-version [options] [archive]/version
Remove the patch log for VERSION from the project tree containing DIR (or the current directory).
Use this command with caution -- it erases revision history from the project tree!
baz log
Show the log messages for the working directory or givenUsage: baz log [-f|--full] [-r start[:end]]
files/directories, since the beginning of time (crossing copies/renames) or since/between the revisions/dates given. Can also be run out of a working directory to
Examples: Show me the changes made to scripts/dpkg-source.pl in the archive:
%%
Show me the changes between a different branch's patch-4, my branches patch-2:
Show me the changes in all revisions of the tree-version after and including patch-123.
baz logs
list patch logs for a version in a project treeUsage: baz logs [options] [[archive]/version ...]
Print the list of patches applied to a project tree DIR (or the current directory) from VERSION.
baz cat-log
print the contents of a project tree log entryUsage: baz cat-log [options] revision-spec
Retrieve and print the patch log for the indicated revision from a project tree.
baz changelog
generate a ChangeLog from a patch logUsage: baz changelog [options] [[archive]/version]
Generate a ChangeLog for VERSION from the patch log for DIR.
baz log-for-merge
generate a log entry body for a mergeUsage: baz log-for-merge [options] [[archive]/version]
Generate a log entry body describing a merge into VERSION.
baz merges
report where two branches have been mergedUsage: baz merges [options] INTO [FROM]
Print a list of pairs of patch level names:
where each pair indicates that at patch level INTO-RVN of INTO, the patch log entry FROM-RVN was added.
FROM may be a branch name, version name, or revision name. If a branch or version name, all merges from that branch or version are reported. If a revision name, only the merge points for that specific revision are reported.
INTO may be a version name or revision name. If a version name, all merge points within that version are printed. If a revision name, all merge points at that revision or earlier are printed.
Output is sorted using patch-level ordering of the first column.
Included patches are listed by full name unless FROM is a revision name. If FROM is a revision, --full causes its full name to be printed.
baz new-merges
list tree patches new to a versionUsage: baz new-merges [options] [[archive]/version]
List all patch log entries in the tree containing DIR that have not already been merged with VERSION.
MULTI-PROJECT CONFIGURATION COMMANDS
baz build-config
instantiate a multi-project configUsage: baz build-config [options] config
Build the named configuration. See also baz cat-config -H".
baz cat-config
output information about a multi-project configUsage: baz cat-config [options] config
Parse and print the indicate config file from a project tree
A config file contains blank lines, comment lines starting with "#", and config specification lines. The config file called $NAME is stored in a project tree as ./configs/$NAME or as ./$NAME.
A config specification line contains a relative path within a project tree, and a specification of the project or revision to store in that location.
For example, the line:
./src/arch
means that, when building the configuration, the latest revision of arch--devo--1.0 should be created within the tree as ./src/arch.
The project specification can be a branch name, version name or the name of a specific revision.
The option --snap says to examine the project tree to find out which revisions of configured project are printed, and generate a new config specification that references those specific revisions. For example, the output for the line shown above might be:
The option --output causes the output from this command to be recorded as a new configuration file (or to replace an existing file if --force is provided).
COMMANDS FOR BRANCHING AND MERGING
baz branch
create a branchUsage: baz branch [options] [SOURCE] BRANCH
Create the continuation at the next patch level of BRANCH which is equivalent to SOURCE.
If SOURCE is not specified, the current project tree revision is used, and the project tree is switched to BRANCH
baz merge
merge from another branchUsage: baz merge [options] [FROM]
Merge changes from FROM into the project tree, considering common ancestry from the project tree reference version, REFERENCE (which defaults to the tree version of the project tree). If FROM is not given, it defaults to the tree revision.
The --star-merge option is for use in situations where the pattern of merges between branches is strictly a star. If you desire standard external rejection hunks, you should use --star-merge --two-way.
By default, merge will perform a three way merge, using any of the 'best' common ancestors available. When used in a star development model, the results will be the same as with --star-merge. However when used in a mesh model, where teams of developers are collaborating with each other, the chosen common ancestor will be the closest commont text, reducing spurious conflicts.
FROM indicates a revision (it may be specified as a version name, indicating the latest revision in that version).
TREE is the project tree into which the merge will occur.
The mesh or graph algorithm details: merge works by computing the closest common ancestor. This is defined as the common ancestor that is reachable in a minimal number of hops from Both FROM and TREE. When multiple ancestors are reachable in the same number of hops, only ancestors with no children reachable in the same number of hops are chosen. If there are multiple ancestors left to choose from, an arbitrary one is chosen. This is optimised for diff3 merges, use of --two-way is NOT RECOMMENDED without also specifying --star-merge.
The --star-merge option details: Star-merge works by computing the most recent ANCESTOR revision of REFERENCE and FROM and then applying the changeset:
to TREE.
The "most recent ancestor" is defined as follows:
MAYBE_ANCESTOR_1 is defined as the highest patch level of FROM in REFERENCE for which both TREE and FROM have a patch log. In other words, it is the latest REFERENCE revision of FROM's version already merged into TREE.
MAYBE_ANCESTOR_2 is defined as the highest patch level in REFERENCE for which both FROM and REFERENCE have a patch log. In other words, it is the latest revision of REFERENCE already merged into FROM.
MAYBE_ANCESTOR_2, if it is not "nil", was merged into FROM at some revision of FROM's version, which we can call LAST_MERGE_INTO_FROM.
If both MAYBE_ANCESTOR_1 or MAYBE_ANCESTOR_2 are nil, star-merge can do nothing.
If just one of MAYBE_ANCESTOR_1 is MAYBE_ANCESTOR_2 is not nil, then that non-nil value is ANCESTOR.
If both MAYBE_ANCESTOR_1 and MAYBE_ANCESTOR_2 are not nil, then LAST_MERGE_INTO_FROM and MAYBE_ANCESTOR_1 are compared (both are revisions in FROM's version). If MAYBE_ANCESTOR_1 is the later revision, then MAYBE_ANCESTOR_1 is ANCESTOR, otherwise, MAYBE_ANCESTOR_2 is ANCESTOR.
baz update
update a project tree to reflect recent archived changesUsage: baz update [options] [version/revision]
Update a project tree by getting the latest revision of VERSION (or the default version of the project tree) and then applying a patch set of the differences between the project tree and the highest revision with which it is up-to-date.
If the merge involves conflicts, a warning message is printed, and the new project tree will contain ".rej" files.
baz replay
apply revision changesets to a project treeUsage: baz replay [options] [version/revision...]
The result is formed by applying patches in the latest revision of VERSION (or the default version of the project tree), stopping after the first patch that causes conflicts. If multiple VERSIONs are specified, they are applied in turn.
If one or more specific REVISIONs (including patch-levels) is specified instead, only those patch sets, and no others, will be applied.
With the --list option, read a list of patches to apply from FILE (- for standard input). Complete revision names should be listed, one per line. replay will stop at the first patch in the list that causes a merge conflict, leaving behind files with names of the form:
,,replay.conflicts-in --
,,replay.remaining
baz apply-delta
compute a changeset between any two trees or revisions and apply it to a project treeUsage: baz apply-delta [options] FROM(REVISION|DIR) TO(REVISION|DIR)
A delta between A and B (both of which may be either a full revision or a project tree) is computed, and then applied to the project tree.
Exit Status Codes:
baz missing
print patches missing from a project treeUsage: baz missing [options] [version]
Print a list of patches missing in the project tree containing DIR (or the current directory) for VERSION (or the default version. of the project tree).
baz join-branch
add a version as an ancestor of a project treeUsage: baz join-branch [options] version
VERSION--base-0 must be a continuation (e.g. tag). The command replays the changeset for VERSION--base-0 in the project tree, which has the effect of adding the log for the branch (making the tag an ancestor of the resulting tree).
baz sync-tree
unify a project tree's patch-log with a given revisionUsage: baz sync-tree [options] revision
The new project tree is formed by getting the REVISION and adding all patch-log entries from REVISION. No actual merging is performed -- only the patch-log is changed.
baz delta
compute a changeset (or diff) between any two trees or revisionsUsage: baz delta [options] (REVISION|TREE)-A (REVISION|TREE)-B [DESTDIR]
Given (REVISION|TREE)-A and (REVISION|TREE)-B, baz will build a changeset that comprises the changes between REVISION-A and REVISION-B
Example:
LOCAL CACHE COMMANDS
baz file-find
find given version of fileUsage: baz file-find [options] file [revision]
Print location of file corresponding to FILE in a cached copy of REVISION
The default patch level for a given version is the latest level for which the project tree has a patch. The default archive and version is as printed by "baz tree-version".
baz pristines
list pristine trees in a project treeUsage: baz pristines [options] [limit]
Print the list of pristine revisions cached in project tree DIR (or the current directory).
baz add-pristine
ensure that a project tree has a particular pristine revisionUsage: baz add-pristine [options] revision
Extract REVISION from an archive, creating a pristine copy. Store that pristine copy in the current directory's project tree
baz find-pristine
find and print the path to a pristine revisionUsage: baz find-pristine [options] revision
Print the location of a pristine copy of the indicated revision
REVISION LIBRARY COMMANDS
baz my-revision-library
print or change your revision library pathUsage: baz my-revision-library [options] [dir]
With no argument, and without -d, print the path to your revision library.
With an argument, record DIR as the path to your revision library in ~/.arch-params/=revision-library
With the option -d (--delete) and no argument, ensure that you do not have a revision library path set in ~/.arch-params.
If no revision library is set, the program exits with status 1, printing an error message unless the -s (--silent) option is given.
baz library-config
configure parameters of a revision libraryUsage: baz library-config [options] library-dir
Set/show various parameters for a revision library.
baz library-find
find and print the location of a revision in the revision libraryUsage: baz library-find [options] revision
Find REVISION in your revision library and print its path. If the revision is not present, print an error message (unless --silent is specified) and exit with non-0 status.
baz library-add
add a revision to the revision libraryUsage: baz library-add [options] revision
Add REVISION to your revision library.
This command has no effect and exits with status 0 if the indicated revision is already in the library.
baz library-remove
remove a revision from the revision libraryUsage: baz library-remove [options] revision
Remove REVISION from your revision library.
If the revision is not present, print an error message and exit with non-0 status.
baz library-archives
list the archives in your revision libraryUsage: baz library-archives [options]
List all archives with records in the revision library.
baz library-categories
list the categories in your revision libraryUsage: baz library-categories [options] [archive]
List all categories within a given archive in the revision library.
baz library-branches
list the branches in a library categoryUsage: baz library-branches [options] [category]
List all branches within CATEGORY in the revision library.
baz library-versions
list the versions in a library branchUsage: baz library-versions [options] [branch]
List all versions within a particular archive/branch with records in the revision library.
baz library-revisions
list the revisions in a library versionUsage: baz library-revisions [options] [version]
List all revisions within a particular archive/version with records in the revision library.
baz library-log
output a log message from the revision libraryUsage: baz library-log [options] revision
Print the log message for REVISION from the library.
baz library-file
find a file in a revision libraryUsage: baz library-file [options] file revision
Find FILE in REVISION in your revision library and print its path. If the revision or file is not present, print an error message and exit with non-0 status.
CACHE COMMANDS
baz cache-config
Print or change your cache settingsUsage: baz cache-config [options] [dir]
With no argument, and without -d, print the path to your cache.
With an argument, record DIR as the path to your
With the option -d (--disable) and no argument, disable caching and forget the cache directory
PUBLISHED REVISIONS COMMANDS
baz grab
grab a published revisionUsage: baz grab [options] location
Grabs a published revision from LOCATION.
A grab file has the following syntax:
MISCELLANEOUS SCRIPTING SUPPORT
baz parse-package-name
parse a package nameUsage: baz parse-package-name [options] name
Options -b, -B, -p, -v, and -l cancel each other.
For -b, -v, and -l, just the id string is printed without "--".
For -p, the output is "<basename>--<branch>".
baz valid-package-name
test a package name for validityUsage: baz valid-package-name [options] name
Exit with status 0 if PACKAGE is a valid package name, status 1 otherwise.
By default, require a basename or basename plus branch label.
Options -v and -l cancel -b and vice versa.
Option -l implies -v.
If an error name is specified (-e or --errname), then invalid names cause an error message on stdout. Otherwise, the exit status is the only output.
By default, validation is strict. For example, -b checks for a valid basename and does not permit a branch label or version number.
With -t, more specific names are permitted. For example, -b will permit a branch name, version number, and patch level.
baz escape
print strings in escaped or unescaped formUsage: baz escape [--unescaped] string
Using Pika escaping rules.
ENVIRONMENT
- EDITOR
- If $EDITOR is set, use its value as the path of the text editor arch is to run when asking the user for text input. If unset, log messages must be given on the command line using the `-L' parameter or in the file created by `baz make-log'.
- HOME
-
User's home directory, where
arch
looks for
.arch-cache/
and
.arch-params/ .
- http_proxy HTTP_PROXY
- If $http_proxy or $HTTP_PROXY is set, arch used its value as the URL of the proxy to use for WebDAV accesses. $http_proxy has higher priority than $HTTP_PROXY. If unset, no proxy is used.
- TMPDIR
- If $TMPDIR is set, arch creates temporary files in the given directory. Otherwise, it uses `/tmp'.
FILES
- ${HOME}/.arch-cache/
- Directory where arch caches archive data
- ${HOME}/.arch-params/
- Directory where all the user's settings are stored.
- ${HOME}/.arch-params/hook
- Hook script called after every execution of baz.
- ${HOME}/.arch-params/signing/
- Directory where the commands for signing and checking signatures are stored.