The FCM system uses simple line based text files to store configuration settings. All configuration files used by FCM are based on the same principles:
#
is a comment
line.my::label this is the value # some comment
::
or slash /
. To improve readability, the
convention is to only use slash as the delimiter when referring to package
names." #
"
marks the end of the value." #
"
at the end of the value is the comment. The
comment is normally ignored by the parser of the configuration
file.true
or false
value, the following can all be
used to indicate a value of false
: an empty string, the
numeric 0
, the string off
or the string
no
. All other values will be considered
true
.\
, the next non-comment line will be the continuation of the
current line. Please note that trailing spaces before the continuation mark
are preserved, and leading spaces are removed from the beginning of a
continuation. If you want to have leading spaces in a continued line, start
the line with a backslash \
before the leading spaces. It is
also worth bearing in mind that the backslash \
character is
only significant if it appears at the end of a value or the beginning of a
continuation line. It is not a special character if it appears elsewhere.
For example:
foo bar\ egg\ ham # will become: foo bareggham foo bar \ egg \ ham # will become: foo bar egg ham foo bar\ \ egg\ \ ham # will become: foo bar egg ham foo bar\ \ egg\ham # will become: foo bar egg\ham
The FCM central and user configuration files can be used to add or modify
some of the default settings of FCM. When the fcm
command is
invoked, it normally attempts to search for a central configuration file at
$BINDIR/../etc/fcm.cfg and then $BINDIR/fcm.cfg,
where $BINDIR is the container directory of the fcm
command. If a central configuration file can be located, the settings in the
file will replace the pre-defined ones. After searching/reading the central
configuration file, the system will attempt to search for a user
configuration file located at $HOME/.fcm of the current user. If
such a file can be found, its settings will replace the pre-defined ones as
well as those defined in the central configuration file.
For information on the valid entries in the central and user configuration files, please refer to the Annex: Declarations in FCM central/user configuration file.
fcm build [OPTIONS...] [CFGFILE]
fcm build
invokes the FCM 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.
If no option is specified, the system uses the -s 5 -t all -j 1
-v 1
by default.
-a [--archive]
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
-f [--full]
--ignore-lock
-j [--jobs] arg
make
command. The argument
arg 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).-s [--stage] arg
make
rules for themmake
command to build the project-t [--targets] arg
-v [--verbose] arg
For further details, please refer to the chapter on The Build System.
fcm extract [OPTIONS...] [CFGFILE]
fcm extract
invokes the FCM 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.
--clean
-f [--full]
--ignore-lock
-v [--verbose] arg
For further details, please refer to the chapter on The Extract System.
fcm cmp-ext-cfg [--verbose (-v) arg] [--wiki (-w) arg] CFG1
CFG2
fcm cmp-ext-cfg
compares the 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 ARG
--wiki
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 [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 a FCM URL keyword, a Subversion URL or a path to a Subversion
working copy.
This section describes all of the code management commands supported by
fcm
.
fcm
simply passes the command directly on to
svn
(after expanding any URL keywords). These commands are
listed in the Other Code Management Commands
section.fcm
adds functionality these commands are discussed
individually.svn
work with fcm
.fcm add --check (-c)
fcm add <any valid svn add options>
fcm add
supports all of the switches and arguments
supported by svn add
(refer to the Subversion
book for details).
In addition, fcm add
supports a --check
switch (no other switches or arguments). When this is specified then
fcm
checks for any files which are not currently under
version control (i.e. those marked with a ? by svn
status
) and prompts to see if you wish to schedule them for
addition at the next commit (using svn add
).
For further details refer to the section Adding and Removing Files.
fcm branch [--info (-i)] [<info-options>]
[TARGET]
fcm branch --delete (-d) [<info-options>]
[<commit-options>] [TARGET]
fcm branch --create (-c) --name (-n) arg [--revision arg]
[<create-options>] [<commit-options>] [TARGET]
fcm branch --list (-l) [<branch-list-options>]
[TARGET]
If 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. For --info
and --delete
, the
specified URL or that of the working copy must be a valid branch
(including the trunk) in a standard FCM project. For
--create
and --list
, it must be a valid URL of
a standard FCM project.
fcm branch --info
Displays information about a branch. This is the default if no options are specified. 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.--show-children
is specified, it lists the
current children of the branch and their create revisions. Where
appropriate, it reports the revision of each child, which is last
merged from/into the current branch. It also reports the available
merges from/into each child into the current branch.--show-siblings
is specified, it reports recent
merges from/into sibling branches. It also reports the available
merges from/into sibling branches where recent merges are detected.
If --verbose
is set, it also prints the log message of
these merges.--show-other
is specified, it reports all
custom and reverse merges into the current branch.--show-children
,
--show-siblings
and --show-other
simultaneously by specifying --show-all
.For further details refer to the section Getting Information About Branches.
fcm branch --delete
Deletes a branch. This command performs the following actions:
fcm
branch --info
.--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).If you specify the --non-interactive
option, the
command will not prompt you for anything. (The
--svn-non-interactive
option is set automatically when
you specify --non-interactive
.)
Subversion may prompt you for authentication if it is the first
time you access the repository. The command fails if the
authentication fails. If you specify the
--svn-non-interactive
option, Subversion will not prompt
you for authentication. In such case, the command will simply fail if
authentication is required. You can use the --password
option to specify a password. Please note that the
--svn-non-interactive
option is always specified if you
are running branch --delete
from the FCM GUI. If
authentication is required, you should specify your password using
the --password
option in Other options.
For further details refer to the section Deleting Branches.
fcm branch --create
Creates a new branch.
You have to choose a name for your branch. This must be specified
as the argument of the --name (-n)
option. The name of
the branch must contain only characters in the set
[A-Za-z0-9_-.].
You can specify the type of branch you are creating using the
--type (-t)
option. The argument to the option must be
one of the following:
DEV::USER
DEV::SHARE
DEV
DEV::USER
TEST::USER
TEST::SHARE
TEST
TEST::USER
PKG::USER
PKG::SHARE
PKG::CONFIG
PKG::REL
PKG
PKG::USER
CONFIG
PKG::CONFIG
REL
PKG::REL
SHARE
DEV::SHARE
USER
DEV::USER
If the --type
option is not specified, it defaults to
DEV::USER.
Your branch name will normally be prefixed by the revision number
from which it is branched. (E.g. if the branch name is
my_branch and you are branching from revision 123 of the
trunk, the final name will be r123_my_branch.) If this
revision number is associated with a revision keyword, the keyword
will be used in place of the revision number. (E.g. if revision 123
is associated with the keyword vn6.1, r123_my_branch
will become vn6.1_my_branch.) You can alter this
behaviour using the argument to the --rev-flag
option.
If 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.
The command will normally create your branch from the last changed revision of the trunk of the specified project.
--revision
option to specify an
earlier revision of the source.--branch-of-branch
option to
create a branch of the source branch.The --ticket
option can be used to specify one or
more Trac ticket numbers, which the branch relates to. Multiple
ticket numbers can be set by specifying this option multiple times,
or by using a comma-separated list of ticket numbers as the argument
to the option. If set, the line Relates to ticket
#<number>[, #<number>...] will be added to the
template commit log.
If you specify the --non-interactive
option, the
command will not prompt you for anything. (The
--svn-non-interactive
option is set automatically when
you specify --non-interactive
.)
Subversion may prompt you for authentication if it is the first
time you access the repository. The command fails if the
authentication fails. If you specify the
--svn-non-interactive
option, Subversion will not prompt
you for authentication. In such case, the command will simply fail if
authentication is required. You can use the --password
option to specify a password. Please note that the
--svn-non-interactive
option is always specified if you
are running branch --create
from the FCM GUI. If
authentication is required, you should specify your password using
the --password
option in Other options.
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 mkdir
to create any sub-directories
required for the copy to succeed.svn copy
to create the branch.For further details refer to the section Creating Branches.
fcm branch --list
Lists the branches created by you (and/or other users) at the HEAD revision of a standard FCM project.
By default, it lists the branches created by you at the HEAD
revision. To display the branches at a different revision, you can
use the --revision arg
option.
You can specify a list of users with the --user arg
option, where arg is a colon separated list of users.
(Alternatively, you can specify this option multiple times.) When
this option is set, the command lists the branches created by the
specified list of users instead. Note that 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
.
You can list all branches in the project by specifying the
--show-all
option. (This option overrides the
--user arg
option.)
By default, it lists the branches in the FCM URL keyword format.
If you want to print the full Subversion URL of the branches, you can
use the --verbose
option.
The command returns 0 (success) if one or more branches is found for the specified users, or 1 (failure) if no branch is found.
fcm commit [--dry-run] [--svn-non-interactive] [--password arg]
[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.Subversion may prompt you for authentication if it is the first time
you access the repository. The command fails if the authentication fails.
If you specify the --non-interactive
option, Subversion will
not prompt you for authentication. In such case, the command will simply
fail if authentication is required. You can use the
--password
option to specify a password. Please note that
the --svn-non-interactive
option is always specified if you
are running commit
from the FCM GUI. If authentication is
required, you should specify your password using the
--password
option in Other options.
The --dry-run
switch prevents the command from committing
any changes. This can be used to allow you to add notes to your commit
message whilst you are still preparing your change.
For further details refer to the section Committing Changes.
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>
fcm delete
supports all of the switches, arguments and
alternate names supported by svn delete
(refer to the
Subversion
book for details).
In addition, fcm delete
supports a --check
switch (no other switches or arguments). When this is specified then
fcm
checks for any files which are missing (i.e. marked with
a ! by svn status
) and prompts to see if you
wish to schedule them for deletion at the next commit (using svn
delete
).
Subversion may prompt you for authentication if it is the first time
you access the repository. The command fails if the authentication fails.
If you specify the --non-interactive
option, Subversion will
not prompt you for authentication. In such case, the command will simply
fail if authentication is required. Please note that the
--non-interactive
option is automatically specified if you
are running delete
from the FCM GUI and you have not checked
the box Check for files and directories.... If authentication
is required, you should run delete
in interactive mode on a
command line.
For further details refer to the section Adding and Removing Files.
fcm diff --branch (-b) [--graphical (-g) | --summarise | --wiki |
--trac (-t)] [TARGET]
fcm diff [--graphical (-g) | --summarise | <any valid svn
diff options>]
fcm diff
supports all of the switches, arguments and
alternate names supported by svn diff
(refer to the Subversion
book for details). In addition, fcm diff
supports the
following switches:
--graphical (-g)
xxdiff
, but you can alter the behaviour by following the
instruction discussed in the sub-section on Examining Changes.) This
switch can be used in combination with all other valid switch
(including --branch
) except --diff-cmd
,
--extensions
, --trac
and
--wiki
.--summarise
--summarize
option. It prints only a summary of the
results.--branch
--trac
is specified, it launches Trac with your
default web browser to display it. Note: if TARGET is a
working copy, local changes in it will not be displayed by
Trac.--wiki
is specified, it prints a Trac wiki
syntax for the differences between the base and the specified
branch.svn diff
to report the
differences between the base and the specified branch (or working
copy).For further details refer to the section Examining Changes.
fcm merge [--dry-run] [--non-interactive] [--verbose (-v)]
SOURCE
fcm merge --custom --revision N[:M] [--dry-run] [--non-interactive]
[--verbose (-v)] SOURCE
fcm merge --custom [--dry-run] [--non-interactive] [--verbose (-v)]
URL1[@REV1] URL2[@REV2]
fcm merge --reverse --revision [M:]N [--dry-run] [--non-interactive]
[--verbose (-v)]
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 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 branch of the working copy. In
this mode, you must specify a revision (range) using the
--revision
option. If you specify a single revision
N, the merge delta is between revision N and
revision N - 1 of the current branch. Otherwise, the merge
delta is between revision M and revision 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.For further details refer to the section Merging.
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.
If a revision is specified using the --revision
option,
it will attempt to create a patch based on the changes at that revision.
If a revision is not specified, it will attempt to create a patch based
on the changes at the HEAD revision. If a revision range is specified, it
will attempt to create a patch for each revision in that range (including
the change in the lower range) where changes have taken place in the URL.
No output will be written if there is no change in the given revision
(range).
The --exclude
option can be used to exclude a path in the
URL. The specified path must be a relative path of the URL. Glob patterns
such as *
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.
The --organisation
option can be used to specify the name
of your organisation. The command will attempt to parse the commit log
message for each revision in the patch. It will remove all merge
templates, replace Trac links with a modified string, and add information
about the original changeset. If you specify the name of your
organisation, it will replace Trac links such as ticket:123
with $organisation_ticket:123, and report the orginal
changeset with a message such as
$organisation_changeset:1000. If the organisation name is
not specified then it defaults to original.
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.
fcm switch [OPTIONS] URL [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
, -r
[--revision]
and -q [--quiet]
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 trac [--browser (-b) ARG] [PATH]
fcm trac
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
PATH.
If the --browser
option is specified, ARG must
be a valid command to a web browser. If this option is not specified, the
default is to use firefox
, or whatever setting you have
declared in the user configuration file ($HOME/.fcm) using
the label SET::MISC::WEB_BROWSER
. For example:
set::misc::web_browser mozilla
If PATH is specified, it must be a path to a local working
copying, a Subversion URL or a FCM URL keyword. If PATH is not
specified, it is set to ., the current working directory. If
PATH 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. If PATH is a Subversion URL or a FCM URL keyword, the
URL can be pegged with a revision number using the
@
symbol. For example, to view the trunk of the FCM
repository at revision 400, you can use fcm:fcm_tr@400. The
URL declared by or associated with PATH must also be
associated with a Trac browser URL, which is declared using the
SET::TRAC::<pck>
label in the FCM central/user
configuration file. The command fails if an associated Trac browser URL
is not found.
fcm update [OPTIONS] [PATH ...]
fcm update
supports the arguments and alternate names
supported by svn update
. It supports the options
--non-interactive
, -r [--revision]
and
-q [--quiet]
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 -r [--revision]
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).Other svn
commands are supported by fcm
without
any change in functionality, with the following minor enhancements:
fcm checkout
command fails if you attempt to checkout
into an existing working copy.svn
command, except for
cat
and any commands with the --xml
option
specified.The following is a list of the commands:
Please refer to the Subversion Complete Reference in the Subversion book for details of these commands.