chproject

Modifies a UCM project or project template

Applicability

Product

Command type

ClearCase®

cleartool subcommand

Platform

UNIX

Linux

Windows

Synopsis

  • Modify a UCM project:
    chproj/ect [ –c/omment comment | –cfi/le pname | –cq/uery
    | –cqe/ach | –nc/omment ]

    {

    [ –amo/dcomp component-selector [,...] ]

    [ –dmo/dcomp component-selector[,...] ]

    [ –to to-folder-selector ] [ –reb/ase_level promotion-level ]

    [ –pol/icy policy-keyword[,...] ] [ –npo/licy policy-keyword[,...] ]

    [ –spo/licy policy-keyword[,...] ]

    [ –crm/enable ClearQuest-user-database-name [–con/nection crm-connection ] | –ncr/menable ]

    [ –bln/ame_template baseline-naming-template ]

    }

    { project-selector ... | -cview }

  • Modify a UCM project template:
    chproj/ect –template [ –c/omment comment | –cfi/le pname | –cq/uery
    | –cqe/ach | –nc/omment ]

    {

    [ –amo/dcomp component-selector [,...] ]

    [ –dmo/dcomp component-selector[,...] ]

    [ –pol/icy policy-keyword[,...] ] [ –npo/licy policy-keyword[,...] ]

    [ –spo/licy policy-keyword[,...] ]

    [ –bln/ame_template baseline-naming-template ]

    [–custompname]

    }

Description

The chproject command modifies one or more UCM projects in the following ways:

  • Adds one or more modifiable components to a project
  • Removes one or more components from the project's modifiable component list
  • Moves a project to another folder
  • Changes the promotion level required of a baseline before it can be recommended by a stream in the project
  • Sets policy for a project
  • Enables or disables a project for use with Rational® ClearQuest®
  • Defines the baseline name template

For information about changing the project's name, see rename.

Adding modifiable components

Over time, a project's scope can expand, and you may need to add modifiable components to the project. The –amodcomp option allows you to add one or more modifiable components. For the streams in the project to capture the changes in component modifiability, do one of two things:

  • If the components have a baseline in the stream, synchronize the stream to the project first with chstream –generate; then reconfigure the views attached to the stream with setcs –stream. For the project's integration stream, however, you need only reconfigure the integration views.
  • If the components do not yet have a baseline in the stream, add baselines for these components with rebase –baseline.

Converting components from modifiable to read-only

If you made some components modifiable when you set up a project and later change your mind, the –dmodcomp option allows you to remove one or more components from the project's modifiable component list. A component cannot be removed from the list if any changes have been made to it in the project. Before performing this operation, verify that no development stream has changes to the component. A warning is issued if any of the following is true:

  • The component or VOB is replicated. Any modification in development streams of replicated VOBs cannot be delivered.
  • One or more of the project's streams are unavailable.
  • The component is already unmodifiable.

After you convert the components to read-only, regenerate the views as needed with setcs –stream.

Setting required promotion levels for recommended baselines

When setting recommended baselines, you can either specify a list of baselines that satisfy certain requirements, or let UCM compute the set of baselines that meet the rebase level specification. A project's rebase level is the minimum promotion level a baseline must have in order to be recommended by a stream in the project if you choose to use rebase levels to set the recommended baselines. For example, if Project A has three promotion levels, REJECTED, TESTED, and RELEASED (in ascending order) and TESTED is the rebase level, the latest baselines labeled TESTED or RELEASED can be recommended by a stream with chstream –recommended –default. For more information, see chstream, rebase, and setplevel.

Using Rational ClearQuest with UCM projects

You can link or unlink a UCM project to a ClearQuest database with the –crmenable or –ncrmenable options. When you enable ClearQuest for a UCM project that contains UCM activities, then for each UCM activity, a ClearQuest record of type UCMUtilityActivity is created and linked to the activity. This process is called activity migration. If you disable a link to ClearQuest from a UCM project that contains activities, all its activities are unlinked from their ClearQuest records.

The –crmenable and –ncrmenable options display a summary of the number of activities that have been migrated or unlinked.

In MultiSite, you are informed when activities cannot be migrated or linked because they are not mastered in the current UCM project VOB replica. These activities are listed along with a list of replicas from which to run the command again to correct the problem.

You can also use the –crmenable and –ncrmenable options to check for possible linking errors. If you believe that your project enabled for ClearQuest may contain activities that are not linked to a ClearQuest record, run chproject –crmenable. This operation scans all activities in the project, migrating all activities that are not linked. To check for linked activities in projects that have been disabled for use with ClearQuest, run chproject –ncrmenable. This operation removes links between activities as needed. For more information, see the DevOps Code ClearCase Guide to Managing Software Projects.

Modifying a project template

You can modify elements of a project template, including the modifiable components, policies, and baseline name templates as for any project. In addition, you can replace the custom file for the template. Specify the –template option to work with the project template. You must use the chproject command from the project VOB directory and have administrator privileges.

–template
Modifies the project template for the local project VOB. Each project VOB can have one project template.
–custom pname
Specifies a pathname for a text file that is stored with the project template.

Restrictions

Identities

You must have one of the following identities:
  • Project owner
  • Project VOB owner
  • root (UNIX and Linux)
  • Member of the ClearCase administrators group (ClearCase on Windows only)

Setting the project policy POLICY_CHPROJECT_UNRESTRICTED skips the permission checking. For more information, see the mkproject reference page.

Locks

An error occurs if there are locks on any of the following objects: the project, the UCM project VOB.

Mastership

(Replicated VOBs only) Your current replica must master the project.

Options and arguments

Event records and comments

Default
Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: –cq). See the comments reference page. Comments can be edited with chevent.
–c/omment comment | –cfi/le comment-file-pname |–cq/uery | –cqe/ach | –nc/omment
Overrides the default with the option you specify. See the comments reference page.

Adding to the list of modifiable components for a project

Default
None.
–amo/dcomp component-selector[,... ]
Adds one or more components to the project's set of modifiable components.

component-selector is of the form [component:]component-name[@vob-selector], where vob-selector specifies the component's project VOB.

Removing from the list of modifiable components for a project

Default
None.
–dmo/dcomp component-selector[,...]
Removes one or more components from the project's set of modifiable components.

component-selector is of the form [component:]component-name[@vob-selector], where vob-selector specifies the component's project VOB.

Moving the project to another folder

Default
None.
–to to-folder-selector
Moves one or more projects to the specified folder. The to-folder and project must have the same UCM project VOB.

folder-selector is of the form [folder:]folder-name[@vob-selector], where vob-selector specifies the folder's project VOB.

Changing the recommended promotion level for a rebase operation

Default
None.
–reb/ase_level promotion-level
Changes the promotion level required for baselines to be recommended by a stream in the project. When you run chstream –recommended –default to set recommended baselines, the latest baseline for each component in the integration stream at or above this promotion level is recommended.

Setting project policy

Default
None.
–pol/icy policy-keyword
Enables the specified policy. For information about project policies, see mkproject.
–npo/licy policy-keyword
Disables the specified policy. For information about project policies, see mkproject.
–spo/licy policy-keyword
Allows the specified policy to be enabled or disabled by individual streams. For information about project policies, see mkproject.

Linking a project to Rational ClearQuest

Default
No linking.
–crm/enable ClearQuest-user-database-name
Enables a link from the project to the specified Rational ClearQuest database. The schema of the ClearQuest database must be enabled for UCM, and your system must be configured for the correct schema repository.
–connection crm-connection
Specifies the database connection to use when connecting with ClearQuest-user-database-name.
–ncr/menable
Disables use of Rational ClearQuest for the specified project.

Modifying the baseline name template

Default
Baseline identifiers are made up of two parts: a user-specifiable root name and a generated, unique numeric extension.
–bln/ame_template baseline-naming-template
Defines the baseline name template for a project if a template has not been defined, or replaces the template if one already exists. baseline-naming-template specifies the tokens to be used in the baseline name and it can include any of the following tokens separated by commas:
  • basename
  • project
  • stream
  • component
  • date
  • time
  • user
  • host

When you create baselines, UCM replaces commas with underscores in the baseline name.

Selecting a project

Default
None.
project-selector ...
Specifies one or more projects to modify.

project-selector is of the form [project:]project-name[@vob-selector], where vob-selector specifies the project's project VOB.

-cview
Specifies the project that is selected by the current view.

Examples

The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you might need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you might need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.

  • Add the modifiable component, webo_modeler, to the project.

    cmd-context chproject -amod webo_modeler webo_proj1@/vobs_webo_pvob
    Changed modifiable component list for project
    "webo_proj1@/vobs_webo_pvob".
    Propagating changes to the integration stream "IntStream1".
    Changes to modifiability of components must be propagated to streams
    and their views. Use `cleartool chstream -generate' to update the
    stream with ``cleartool setcs -stream' for each view attached to the
    stream or see the stream and view properties pages.
    Changed modifiable component list and propagated changes to streams in
    project "webo_proj1@/vobs_webo_pvob".

  • Define the baseline name template for the CQ_ASP_V6.0 project.

    cmd-context chproject -bln component,date,time,basename CQ_ASP_V6.0@/
    vobs_mpreston_crm

    Changed baseline naming template for project "CQ_ASP_V6.0".