You can search for objects in the database.
About this task
ccm query [(-n|-name name)...] [(-o|-owner owner)...]
[(-s|-state state)...] [(-t|-type type)...]
[(-v|-version version)...] [(-i|-instance instance)...]
[(-release release_spec)...] [(-task task_spec)...]
[-f|-format format] [-nf|-noformat]
([-ch|-column_header] | [-nch|-nocolumn_header])
[-sep|-separator separator] ([-sby|-sortby sortspec] |
[-ns|-nosort|-no_sort]) [-gby|-groupby groupformat]
[-u|-unnumbered] [query_string]
- -ch|-column_header
- Specifies to use a column header in the output format. See -ch|-column_header for details.
- -f|-format format
- Specifies the command output format. See -f|-format for details.
- -gby|-groupby groupformat
- Specifies how to group the command output. See -gby|-groupby for details.
- -i|-instance instance...
- Includes a query clause of the form instance='instance' to
find objects with the specified instance.
- -n|-name name...
- Includes a query clause of the form name='name' to
find objects with the specified name.
- -nch|-nocolumn_header
- Specifies not to use a column header in the output format. See -nch|-nocolumn_header for details.
- -nf|-noformat
- Specifies not to use column alignment. See -nf|-noformat for details.
- -ns|-no_sort
- Specifies not to sort the command output. See -ns|-nosort for details.
- -o|-owner owner...
- Includes a query clause of the form owner='owner' to
find objects with the specified owner.
- query_string
- Specifies a query string to be combined with query clauses. The
query clauses are generated from query-related options and form the
query expression that is evaluated.
- -release release_spec...
- Includes a query clause of the form release='release' to
find objects with the specified release value. You can set release_spec to
multiple release definitions. See Release specification for details.
- -sep|-separator separator
- Specifies a different separator character. See -sep|-separator for details.
- -sby|-sortby sortspec
- Specifies how to sort the command output. See -sby|-sortby for details.
- -s|-state state...
- Includes a query clause of the form state='state' to
find objects with the specified state.
- -task task_spec...
- Includes a query clause of the form is_associated_cv_of(task('task_spec')) to
find the associated objects of the specified task. You can set task_spec to
multiple tasks. See Task specification for details.
- -t|-type type...
- Includes a query clause of the form cvtype='type' to
find objects with the specified type.
- -v|-version version...
- Includes a query clause of the form version='version' to
find objects with the specified version.
- -u|-unnumbered
- Suppresses automatic numbering of the command output. See -u|-unnumbered for details.
Example
- List
all objects named main.c owned by jane.
ccm query -n main.c -o jane
1)
main.c-1 integrate jane nasub1 csrc 1 1
2) main.c-1.2
working jane nasub1 csrc 1 4
3) main.c-2 working jane
nasub2 csrc 1 5
- To look at the source contents of item 3 in the
selection set, enter.
ccm cat @3
- List all objects named main.c,
owned by ann, for task 4.
ccm
query -n main.c -o ann -task 4
1) main.c-1.2 working
ann csrc 1 4
- List the name and time last modified of all objects
named brochure.doc owned by ann.
ccm query -n brochure.doc -o ann -f "%name %modify_time"
1) brochure.doc Tue Aug 6 12:17:55 1996
- List all objects associated with task 3 that are
from the santa_fe database.
ccm
query -task 3 -db santa_fe
1) DropEdit.cpp-1 integrate
tom c++ diffmerge santa_fe#1 <void>
2) vdifmrgDoc.cpp-1
integrate tom c++ diffmerge santa_fe#1 <void>
- List change requests associated with a particular
transfer set.
ccm query query_expression
where query_expression is the change
request query that is being used for the transfer set, and includes "cvtype=problem".
For example:
ccm query
"cvtype='problem' and product_name='myproduct'"
- Show release-specific process rules that are instantiations
of the Collaborative Development generic process
rule.
ccm query ''cvtype='process_rule'
and name='Collaborative Development'' -f "%none %is_generic_pr_of"