ClearCase-Wrapper-MGi

 view release on metacpan or  search on metacpan

extra/Examples.pod  view on Meta::CPAN

 Created branch type "tt".
 $ ct co -nc .
 Created branch "tt" from "." version "/main/0".
 Checked out "." from version "/main/tt/0".
 $ ct mkdir -nc a
 Created directory element "a".
 Created branch "tt" from "a" version "/main/0".
 Checked out "a" from version "/main/tt/0".
 $ ct mkelem -nc -ci a/foo
 Created element "a/foo" (type "text_file").
 Created branch "tt" from "a/foo" version "/main/0".
 Checked in "a/foo" version "/main/tt/1".
 $ ct ci -nc a
 Checked in "a" version "/main/tt/1".

=head2 APPLYING INCREMENTAL LABELS

=head3 Create a family label type

 $ ct mklbtype -c 'Family demo' -fam TTT
 Created label type "TTT_1.00".
 Created label type "TTT".
 Created attribute type "RmTTT".

Note that this creates:

=over

=item A I<floating> type: TTT

=item An equivalent I<fixed> type: TTT_1.00

=item An attribute type dedicated to the family (see: I<rmlabel> below).

=back

=head3 Apply the base labels

 $ ct mklabel -rec TTT .
 Created label "TTT_1.00" on "." version "/main/tt/1".
 Created label "TTT" on "." version "/main/tt/1".
 Created label "TTT_1.00" on "a" version "/main/tt/1".
 Created label "TTT" on "a" version "/main/tt/1".
 Created label "TTT_1.00" on "a/foo" version "/main/tt/1".
 Created label "TTT" on "a/foo" version "/main/tt/1".

The labels are applied in pairs: fixed, and floating.
The first application is thus significantly slower than usual (~4 times),
but this impact is typically negligible, on an initial tree with only
few elements.

=head3 Lock the label types

 $ ct lock lbtype:TTT
 Locked label type "TTT".
 Locked label type "TTT_1.00".

This is not mandatory of course, but it is a good idea, and it is supported.
The fixed type should not be moved anymore, so why not locking it?

The floating label will get unlocked as needed, but locking it
communicates its state to others, and leaves a timestamp (the latest
one does not get scrubbed).

=head3 Increment the label type

 $ ct mklbtype -c 'Increment demo' -inc TTT
 Unlocked label type "TTT".
 Unlocked label type "TTT_1.00".
 Created label type "TTT_1.01".
 Locked label type "TTT_1.00".

A new incremental fixed label is created.
It gets linked to the previous one, which is thus unlocked,
and locked back.

=head3 Make a change, and label incrementally

 $ ct co -nc a/foo
 Checked out "a/foo" from version "/main/tt/1".
 $ ct ci -nc -ide a/foo
 Checked in "a/foo" version "/main/tt/2".
 $ ct mklabel -over tt TTT .
 Created label "TTT_1.01" on "a/foo" version "/main/tt/2".
 Moved label "TTT" on "a/foo" from version "/main/tt/1" to "/main/tt/2".

We use the I<-over tt> option as a way to optimize the labeling speed.
Note that it also restricts the application to checked-in versions.

Labeling recursively would display the same incremental behaviour,
possibly applying labels to checked-out versions.

=head3 Check the results so far

 $ ct lsgen a/foo a
 a/foo@@/main/tt/2 (TTT, TTT_1.01)
  a/foo@@/main/tt/1 (TTT_1.00)
 a@@/main/tt/1 (TTT, TTT_1.00)

We examine two objects, with the I<lsgenealogy> command.

This one navigates I<Merge> hyperlinks to present the recent history
of contribution to the selected versions.

We note that the floating label designates a (full) baseline, whereas
the fixed labels are I<sparse> and designate thus the successive
change sets.

=head3 Increment again, to remove a label

 $ ct mklbtype -c 'Remove label' -inc TTT
 Created label type "TTT_1.02".
 $ ct rmlabel TTT a/foo
 Removed label "TTT" from "a/foo" version "/main/tt/2".

What we want to demonstrate now is a way to restore a past
configuration.  For this we shall still create one version and apply
one more increment, in order to build up enough of history.

 $ ct co -nc a/foo
 Checked out "a/foo" from version "/main/tt/2".
 $ ct ci -nc -ide a/foo
 Checked in "a/foo" version "/main/tt/3".
 $ ct mklbtype -c 'Restore old config' -inc TTT
 Created label type "TTT_1.03".
 $ ct mklabel -over tt TTT .
 Created label "TTT_1.03" on "a/foo" version "/main/tt/3".
 Created label "TTT" on "./a/foo" version "/main/tt/3".

Note that the floating label was created, not moved, since we had
removed it previously.

=head2 ARCHIVING BRANCHES AND LABELS

=head3 Archive to label



( run in 1.718 second using v1.01-cache-2.11-cpan-39bf76dae61 )