This chapter describes all commands supported by fcm
.
fcm
has its own set of functionalities, but it also wraps all
svn
commands.
In most wrappers to svn
, fcm
simply passes the
command directly on to svn
(after expanding any keywords). These
commands are listed in the Other Subversion Commands
section.
Where fcm
adds more functionality to an svn
command, the command is discussed individually.
All command abbreviations supported by svn
work with
fcm
.
Subversion may prompt you for authentication if it is the first time you
write to a repository. The command fails if the authentication fails. A
command may support the --non-interactive
or
--svn-non-interactive
option. If such an option is specified,
Subversion will not prompt you for authentication, and the command will
simply fail if authentication is required. Please note that the option is
normally specified if you are running a command from the FCM GUI. If
authentication is required, you should run the command in interactive mode on
a command line, or by using the --password=PASSWORD
option in
the Other options.
The following environment variables are used by the fcm
command.
$FCM_HOME/etc/fcm/
and
~/.metomi/fcm/
(where $FCM_HOME/bin/fcm is where the
fcm
command is invoked.-v
option.fcm add --check (-c) [PATH]
fcm add <any valid svn add options>
In the 1st form (i.e. fcm add --check
), the system checks
for any files which are not currently under version control (i.e. those
marked with a ? by svn status
) and prompts the
user to make a decision on whether to schedule them for addition at the
next commit (using svn add
).
In the 2nd form (i.e. without the --check
option),
fcm add
simply pass control to svn add
. (For
detail of usage, please refer to the Subversion
book.)
For further details refer to the section Adding and Removing Files.
Deprecated. The 4 usages of this command have been replaced by the following commands:
fcm branch --create --name NAME
fcm branch --delete
fcm branch [--info]
fcm branch --list
fcm branch-create [OPTIONS] NAME [SOURCE]
Creates a new branch.
The 1st argument NAME must be the short name for your
branch. The name of the branch must contain only characters in the set
[A-Za-z0-9_-.]
. If the --ticket=N
option is not
specified and NAME contains only a list of positive integers
separated by [_-]
(an underscore or a hyphen), the command
will assume that NAME also specifies the related ticket
numbers.
If the 2nd argument SOURCE is specified, it must either be a URL or a path to a working copy of a standard FCM project. Otherwise, the current working directory must be a working copy of a standard FCM project.
This command performs the following actions:
--non-interactive
option, it
starts an editor (using a similar convention as commit) to allow you to add further comment to the
commit log message. A standard commit log template and change summary
is provided for you below the line that says --Add your commit
message ABOVE - do not alter this line or those below--. If you
need to add any extra message to the log, please do so
above this line. When you exit the editor, the command
will report the commit log before prompting for confirmation that you
wish to proceed (it aborts if not).svn copy
to create the branch.For further details refer to the section Creating Branches.
--branch-of-branch
, --bob
--non-interactive
--svn-non-interactive
option is set automatically when you
specify --non-interactive
.)--password=PASSWORD
--rev-flag=NONE|NORMAL|NUMBER
NORMAL
is specified, it
uses the default behaviour. If NUMBER
is specified, it
will always use the revision number as the prefix, regardless of
whether the revision number is defined as a keyword or not. If
NONE
is specified, it will not add a prefix to your branch
name.--svn-non-interactive
svn
in non-interactive
mode.--switch
, -s
fcm switch
the current
working directory (if it contains a relevant working copy) to point to
the newly created branch after the branch is created.--ticket=N
, -k N
--type=TYPE
, -t TYPE
DEV::USER
, DEV
, USER
(default)DEV::SHARE
, SHARE
TEST::USER
, TEST
TEST::SHARE
PKG::USER
, PKG
PKG::SHARE
PKG::CONFIG
, CONFIG
PKG::REL
, REL
fcm branch-delete [OPTIONS] [TARGET]
Deletes a branch.
If TARGET is specified, it must either be a URL or a path to a local working copy of a valid branch of a standard FCM project. Otherwise, the current working directory must be a working copy of a valid branch of a standard FCM project.
This command performs the following actions:
--non-interactive
option, it
starts an editor (using a similar convention as commit) to allow you to add further comment to the
commit log message. A standard commit log template and change summary
is provided for you below the line that says --Add your commit
message ABOVE - do not alter this line or those below--. If you
need to add any extra message to the log, please do so
above this line. When you exit the editor, the command
will report the commit log before prompting for confirmation that you
wish to proceed with deleting the branch (it aborts if not).For further details refer to the section Deleting Branches.
The command supports all options of fcm branch-info as well as the following:
--non-interactive
--svn-non-interactive
option is set automatically when you
specify --non-interactive
.)--password=PASSWORD
--svn-non-interactive
svn
in non-interactive
mode.--switch
, -s
fcm switch
the current working
copy to point to the trunk after the branch deletion.fcm branch-diff [OPTIONS] [TARGET]
The command displays the differences between the target branch and its parent. This should show you the differences which you would get if you tried to merge the changes in the branch into its parent.
If an argument TARGET is specified, it must either be a URL or a path to a local working copy. Otherwise, the current working directory must be a working copy. The specified URL or that of the working copy must be a valid branch in a standard FCM project.
The command determines the base of the branch relative to its parent.
This is adjusted to account for any merges from the branch to its parent
or vice-versa. It then reports what path and revision it is comparing
against using svn diff
or otherwise.
For further details refer to the section Examining Changes.
--diff-cmd=COMMAND
svn diff
.--extensions=EXT
, -x EXT
svn diff
.--graphical
, -g
svn diff
to use a graphical tool to display
the differences. (The default graphical diff tool is
xxdiff
, but you can alter the behaviour by following the
instruction discussed in the sub-section on Examining Changes.) This
switch should not be used with --diff-cmd
,
--extensions
, --trac
and
--wiki
.--summarize
, --summarise
svn diff --summarize
.--xml
--trac
, -t
--wiki
, -w
fcm branch-info [OPTIONS] [TARGET]
Displays information about a branch.
If the argument TARGET is specified, it must either be a URL or a path to a local working copy of a valid branch of a standard FCM project. Otherwise, the current working directory must be a working copy of a valid branch of a standard FCM project.
It performs the following actions:
svn info
.--verbose
is set, it also prints the log message of
the last change revision.--verbose
is set, it prints the log
message of the branch creation revision.--verbose
is set, it also prints the log message of
these merges.--verbose
is set, it also prints
the log message of these revisions.For further details refer to the section Getting Information About Branches.
--show-all
, -a
--show-children
, --show-other
and --show-siblings
.--show-children
--show-other
--show-siblings
--verbose
is set, it also prints the log
message of these merges.--verbose
, -v
fcm branch-list [OPTIONS] [TARGET ...]
Searches and lists branches in projects. By default, it lists only branches created by the current user.
If no TARGET is specified, the current working directory is assumed to be the target. Each target must either be a URL[@REV] or a PATH[@REV] to a working copy of a standard FCM project.
--only=DEPTH:PATTERN
--show-all
and --user=PATTERN
options.)--quiet
, -q
--show-all
, -a
--user=USER
option.)--url
--user=PATTERN
, -u PATTERN
--only=2:^PATTERN$
for projects with the
normal FCM branch naming convention. Lists branches created by the
specified list of users instead of the current user. With the normal FCM
branch naming convention, you can also list shared branches by
specifying the user as Share
, configuration branches by
specifying the user as Config
and release branches by
specifying the user as Rel
. (This option is
cumalative.)fcm browse [OPTIONS] [TARGET ...]
fcm browse
invokes the web-browser to launch the
corresponding URL of the web-based repository browser (currently Trac
browser) to view the Subversion repository specified by
TARGET.
If TARGET is specified, it must be a path to a local working copying, a Subversion URL or an FCM URL keyword. Otherwise, it is set to ., the current working directory. If TARGET is a directory in the local file system, the command will determine whether it is a working copy. If so, its associated Subversion URL will be used. The command fails if the directory is not a working copy. The Subversion URL must be associated with an FCM location keyword, so that the system knows how to map the Subversion URL to the web browser URL.
--browser=COMMAND
, -b COMMAND
firefox
, or the browser
setting in the external configuration files (i.e.
$FCM/etc/fcm/external.cfg and
$HOME/.metomi/fcm/external.cfg). For example:
browser = konqueror
fcm build [OPTIONS...] [CFGFILE]
fcm build
invokes the deprecated FCM 1 build system.
The path to a valid build configuration file CFGFILE may be provided as either a URL or a pathname. Otherwise, the build system searches the default locations for a build configuration file.
For further details, please refer to the chapter on The FCM 1 Build System.
If no option is specified, the system uses the -s 5 -t all -j 1
-v 1
by default.
--archive
, -a
tar
format at the end of a successful build. This option
should not be used if the current build is intended to be re-used as a
pre-compiled build.--clean
--full
, -f
--ignore-lock
--jobs=N
, -j N
make
command. The argument
N must be a natural integer to represent the number of jobs.
If not specified, the default is to perform serial make
(i.e. 1 job).--stage=STAGE
, -s STAGE
make
rules for themmake
command to build the project--targets=TARGETS
, -t TARGETS
--verbose=N
, -v N
fcm cfg-print [OPTIONS] [TARGET ...]
Parses each FCM configuration file specified in the argument list, and prints the result to STDOUT.
--fcm1
, -f
fcm cmp-ext-cfg [OPTIONS] CFG1 CFG2
fcm cmp-ext-cfg
compares the deprecated FCM 1 extract
configurations of two similar extract configuration files CFG1
and CFG2. It reports repository branches and source
directories that are declared in one file but not another. If a source
directory is declared in both files, it compares their versions. If they
differ, it uses svn log
to obtain a list of revision numbers
at which changes are made to the source directory. It then reports, for
each declared repository branch, the revisions at which changes occur in
their declared source directories.
The list of revisions for each declared repository branch is normally printed out as a simple list in plain text.
--verbose=N
, -v N
--wiki-format=TARGET
, --wiki=TARGET
,
-w TARGET
fcm commit [OPTIONS] [PATH]
fcm commit
sends changes from your working copy in the
current working directory (or from PATH if it is specified) to
the repository.
This command performs the following actions:
svn commit
. If you need to add any extra
message to the log, please do so above this line.nedit
is used.svn commit
to send the changes to the
repository.svn update
to bring your working copy up to
the new revision.For further details refer to the section Committing Changes.
--dry-run
--password=PASSWORD
--svn-non-interactive
svn
in non-interactive
mode.fcm conflicts [PATH]
fcm conflicts
helps you to resolve any text files in your
working copy which have conflicts by using the graphical merge tool
xxdiff
. If PATH is set, it must be a working
copy, and the command will operate in it. If PATH is not set,
the command will operate in your current working directory.
This command performs the following actions:
svn status
) it calls
xxdiff
.xxdiff
reports all conflicts resolved then if asks
if you wish to run svn resolved
on that file.For further details refer to the section Resolving Conflicts.
fcm delete --check (-c)
fcm delete <any valid svn delete options>
In the 1st form (i.e. fcm delete --check
), the system
checks for any files which are missing (i.e. those marked with a
! by svn status
) and prompts the user to make a
decision on whether to schedule them for deletion at the next commit
(using svn delete
).
In the 2nd form (i.e. without the --check
option),
fcm delete
simply pass control to svn delete
.
(For detail of usage, please refer to the Subversion
book.)
For further details refer to the section Adding and Removing Files.
fcm diff [OPTIONS] [TARGET ...]
Display the differences between two revisions or paths. fcm
diff
supports all of the arguments and alternate names supported
by svn diff
(refer to the Subversion
book for details).
For further details refer to the section Examining Changes.
fcm diff
supports the following options in addition to
the options of svn diff
(refer to the Subversion
book for details):
--graphical
, -g
xxdiff
, but you can alter the behaviour by following the
instruction discussed in the sub-section on Examining Changes.) This
option can be used in combination with all other valid options except
--diff-cmd
and --extensions
.--summarise
--summarize
option. It prints only a summary of the
results.--branch
, -b
fcm export-items [OPTIONS...] SOURCE
fcm export-items
exports directories in SOURCE as a list
of versioned items. The SOURCE should be the URL of a branch in a
Subversion repository with the standard FCM layout.
This command is used to support a legacy working practice, in which directories in a source tree are regarded as individual versioned items.
The configuration file should be in the deprecated FCM 1 configuration
format. The label in each entry should be a path relative to the source
URL. If the path ends in * then the path is expanded
recursively and any sub-directories containing regular files are added to
the list of relative paths to export. The value may be empty, or it may
be a list of space separated conditions. Each condition is a
conditional operator (>
, >=
,
<
, <=
, ==
or
!=
) followed by a revision number. The command uses the
revision log to determine the revisions at which the relative path has
been updated in the source URL. If these revisions also satisfy the
conditions set by the user, they will be considered in the export.
For further details, please refer to System Administration > Maintaining alternate versions of namelists and data files.
--config-file=PATH
, --file=PATH
, -f
PATH
--directory=PATH
, -C PATH
--new
, -N
fcm extract [OPTIONS...] [CFGFILE]
fcm extract
invokes the deprecated FCM 1 extract
system.
The path to a valid extract configuration file CFGFILE may be provided as either a URL or a pathname. Otherwise, the extract system searches the default locations for an extract configuration file.
For further details, please refer to the chapter on The FCM 1 Extract System.
--clean
--full
, -f
--ignore-lock
--verbose=N
, -v N
fcm gui [DIR]
fcm gui
starts up the FCM GUI. If DIR is
specified then this is used as the working directory.
For further details, please refer to the section Using the GUI.
fcm keyword-print [OPTIONS] [TARGET ...]
If no argument is specified, fcm keyword-print
prints all
the registered FCM location keywords. Otherwise, it prints the location
and revision keywords according to the argument TARGET, which
must be an FCM URL keyword, a Subversion URL or a path to a Subversion
working copy.
--verbose
, -v
fcm loc-layout [OPTIONS] [TARGET ...]
Parse the URL of a FCM/Subversion TARGET, and print its FCM layout information.
If no argument is specified, TARGET is the current working directory.
See also System Administration > Subversion > Repository Layout.
--verbose
, -v
fcm make [OPTIONS] [DECLARATION ...]
fcm make
invokes the FCM make system, which is used to
run the extract and build systems and other utilities.
For further details, please refer to the chapter on FCM Make.
Each argument is considered to be a declaration line to append to the configuration file.
--archive, -a
The archive mode is not suitable for a make that will be inherited or used by other makes.
--config-file-path=PATH, -F PATH
--config-file=PATH, --file=PATH, -f PATH
--directory=PATH, -C PATH
--ignore-lock
--jobs=N, -j N
--name=NAME
, -n NAME
fcm-makeNAME.cfginstead of
fcm-make.cfg, and will write context files in
.fcm-makeNAME/and log files as
fcm-makeNAME.log, etc.
--new
, -N
--quiet, -q
--verbose, -v
fcm merge [OPTIONS] SOURCE
fcm merge --custom --revision N[:M] [OPTIONS] SOURCE
fcm merge --custom [OPTIONS] URL1[@REV1] URL2[@REV2]
fcm merge --reverse [--revision [M:]N] [OPTIONS]
fcm merge
allows you to merge changes from a source into
your working copy.
Before it begins, the command does the following:
--non-interactive
option, it
checks for any local modifications in your working copy. If it finds
any it reports them and asks you to confirm that you wish to continue
(it aborts if not).--custom
nor
--reverse
is specified)Automatic merges are used to merge changes between two directly related branches, (i.e. the branches must either be created from the same parent or have a parent/child relationship). These merges are tracked by FCM and can be used by subsequent FCM commands. The merge delta is calculated by doing the following:
--verbose
option is set, it prints the log for these revisions. It aborts if
no revision is available for merging.--non-interactive
target, it asks
you which revision of the SOURCE you wish to merge from.
The default is the last changed revision of the SOURCE.
The merge delta is between the base and the specified revision of
the SOURCE.N.B.: The command looks for changes in the SOURCE by going through the list of changed files since the SOURCE was last merged into the TARGET. (If there is no previous merge from SOURCE to TARGET, the common ancestor is used.) It is worth noting that there are situations when the command will regard your merge as unsafe (and so will fail incorrectly) even if the changes in the SOURCE outside of the current sub-tree will result in a null merge. This can happen if the changes are the results of a previous merge from the TARGET to the SOURCE or if these changes have been reversed. In such case, you will have to perform your merge in a working copy of a full tree.
--custom
is specified)The custom mode is useful if you need to merge changes selectively from another branch. The custom mode can be used in two forms:
--revision
option. If
you specify a single revision N, the merge delta is
between revision N - 1 and revision N of the
SOURCE. Otherwise, the merge delta is between revision N
and revision M, where N <
M.N.B. Unlike automatic merges, custom merges are not tracked or
used by subsequent FCM diff
or merge
commands, (although branch-info
can be set to report
them). Custom merges are always allowed, even if your working copy is
pointing to a sub-tree of a branch. However, there is no checking
mechanism to ensure the safety of your sub-tree custom merge so you
should only do this if you are confident it is what you want.
Therefore, it is recommended that you use automatic merges where
possible, and use custom merges only if you know what you are
doing.
--reverse
is specified)The reverse mode is useful if you need to reverse a changeset (or
a range of changesets) in the current source of the working copy. If
a revision is not specified with --revision=M:N
, it
attempts to merge the delta COMMITTED:(COMMITTED - 1). If
a single revision N is specified, the merge delta is
N:(N - 1). Otherwise, the merge delta is between revision
M:N, where M > N.
N.B. Like custom merges, reverse merges are not tracked or used by
subsequent FCM diff
or merge
commands,
(although branch-info
can be set to report them).
Likewise, reverse merges in sub-trees are always allowed, although
there is no checking mechanism to ensure the safety of your sub-tree
reverse merge.
Once the merge delta is determined, the command performs the following:
--dry-run
option or if you are running
in the interactive mode, it reports what changes will result from
performing this merge by calling svn merge --dry-run
.
svn merge --dry-run
command
if the --verbose
option is specified.--dry-run
option, it exits
after reporting what changes will result from performing the
merge.svn merge
to apply
the delta between the base and the SOURCE on your working
copy.
svn merge
command if the
--verbose
option is specified.--auto-log
option is specified in the
automatic mode, it adds the log messages of the merged revisions as
well as the standard template.For further details refer to the section Merging.
--auto-log
--dry-run
--non-interactive
--revision=REV
, -r REV
--verbose
, -v
fcm mkpatch [OPTIONS] URL [OUTDIR]
fcm mkpatch
creates patches from the specified revisions
of the specified URL, which must be a branch URL of a valid
FCM project. If the URL is a sub-directory of a branch, it
will use the root of the branch.
If OUTDIR is specified, the output is sent to OUTDIR. Otherwise, the output will be sent to a default location in the current directory ($PWD/fcm-mkpatch-out/). The output directory will contain the patch for each revision as well as a script for importing the patch.
Within the output directory are the patches and the log
message file for each revision. It also contains a generated script
fcm-import-patch
for importing the patches. The user of the
script can invoke the script with either a URL or a working copy
argument, and the script will attempt to import the patches into the
given URL or working copy.
It is worth noting that changes in Subversion properties, including changes in executable permissions, are not handled by the import script.
--exclude=PATH
*
and
?
are acceptable. Changes in an excluded path will not be
considered in the patch. A changeset containing changes only in the
excluded path will not be considered at all. Multiple paths can be
specified by using a colon-separated list of paths, or by specifying
this option multiple times.--organisation=NAME
--revision=REV
, -r REV
fcm project-create [OPTIONS] PROJECT-NAME REPOS-ROOT-URL
Create a new project and its trunk directory in a repository.
If you do not specify the --non-interactive
option, it
starts an editor (using a similar convention as commit) to allow you to add further comment to the
commit log message. A standard commit log template and change summary
is provided for you below the line that says --Add your commit
message ABOVE - do not alter this line or those below--. If you
need to add any extra message to the log, please do so
above this line. When you exit the editor, the command
will report the commit log before prompting for confirmation that you
wish to proceed (it aborts if not).
--non-interactive
--svn-non-interactive
option is set automatically when you
specify --non-interactive
.)--password=PASSWORD
--svn-non-interactive
svn
in non-interactive
mode.fcm switch [OPTIONS] URL[@REV1] [PATH]
fcm switch --relocate [OPTIONS] FROM TO [PATH]
fcm switch
supports the arguments and alternate names
supported by svn switch
. If --relocate
is
specified, it supports all options supported by svn switch
.
Otherwise, it supports --non-interactive
,
--revision=REV
(-r REV
) and
--quiet
(-q
only. (Please refer to the Subversion
book for details).
If --relocate
is specified, FCM will pass the options and
arguments directly to the corresponding Subversion command. Otherwise,
FCM will ensure that your working copy switches safely through the
following actions:
--non-interactive
option, it
checks for any local modifications in your working copy. If it finds
any it reports them and asks you to confirm that you wish to continue
(it aborts if not).switch
.For further details refer to the section Switching your working copy to point to another branch.
fcm test-battery [...]
Run FCM self tests.
Change directory to the FCM source tree, and runs this shell commmand:
exec prove -j "${NPROC:-9}" -s -r "${@:-t}"
where NPROC is the number of processors on your computer. You can override the prove command line by specifying extra arguments. E.g. If you do not want to run the full test suite, you can specify the names of individual test files or their containing directories as extra arguments. For example:
Run the full test suite with the default options.
fcm test-battery
Run the full test suite with 12 processes.
fcm test-battery -j 12
Run only tests under t/fcm-make/
with 12 processes.
fcm test-battery -j 12 t/fcm-make
Run only t/fcm-make/10-log.t
in verbose mode.
fcm test-battery -v t/fcm-make/10-log.t
fcm update [OPTIONS] [PATH ...]
fcm update
supports the arguments and alternate names
supported by svn update
. It supports the options
--non-interactive
, --revision=REV
(-r
REV
) and --quiet
(-q
) only. (Please
refer to the Subversion
book for details).
FCM will ensure that your working copies updates safely through the following actions:
--non-interactive
option, it
uses svn status --show-updates
to display what will be
updated in your working copies and to check for local modifications (if
you specify --revision=REV
(-r REV
then it
just uses svn status
). If it finds any it reports them and
asks you to confirm that you wish to continue (it aborts if not).fcm version
Print FCM version string.
Other svn
commands are supported by fcm
with the
following minor enhancements:
fcm checkout
command fails if you attempt to checkout
into an existing working copy.The following is a list of the commands:
Please refer to the Subversion Complete Reference in the Subversion book for details of these commands.