ClearCase-Wrapper-DSB
view release on metacpan or search on metacpan
#############################################################################
# Usage Message Extensions
#############################################################################
{
local $^W = 0;
no strict 'vars';
# Usage message additions for actual cleartool commands that we extend.
$catcs = "\n* [-cmnt|-expand|-sources|-start]";
$describe = "\n* [--par/ents <n>]";
$lock = "\n* [-allow|-deny login-name[,...]] [-iflocked]";
$lsregion = "\n* [-current]";
$mklabel = "\n* [-up]";
$setcs = "\n* [-clone view-tag] [-expand] [-sync|-needed]";
$setview = "\n* [-me] [-drive drive:] [-persistent]";
$update = "\n* [-quiet]";
$winkin = "\n* [-vp] [-tag view-tag]";
# Usage messages for pseudo cleartool commands that we implement here.
# Note: we used to localize $0 but that turns out to trigger a bug
# in perl 5.6.1.
my $z = (($ARGV[0] eq 'help') ? $ARGV[1] : $ARGV[0]) || '';
$comment = "$z [-new] [-element] object-selector ...";
$diffcs = "$z view-tag-1 [view-tag-2]";
$eclipse = "$z element ...";
$edattr = "$z [-view [-tag view-tag]] | [-element] object-selector ...";
$grep = "$z [grep-flags] pattern element";
$protectview = "$z [-force] [-replace]"
. "\n[-chown login-name] [-chgrp group-name] [-chmod permissions]"
. "\n[-add_group group-name[,...]]"
. "\n[-delete_group group-name[,...]]"
. "\n{-tag view-tag | view-storage-dir-pname ...}";
$recheckout = "$z [-keep|-rm] pname ...";
$winkout = "$z [-dir|-rec|-all] [-f file] [-pro/mote] [-do]"
. "\n[-meta file [-print] file ...";
$workon = "$z [-me] [-login] [-exec command-invocation] view-tag";
}
#############################################################################
# Command Aliases
#############################################################################
*des = *describe;
*desc = *describe;
*edcmnt = *comment;
*egrep = *grep;
*mkbrtype = *mklbtype; # not synonyms but the code's the same
*reco = *recheckout;
*work = *workon;
1;
__END__
=head1 NAME
ClearCase::Wrapper::DSB - David Boyce's contributed cleartool wrapper functions
=head1 SYNOPSIS
This is an C<overlay module> for B<ClearCase::Wrapper> containing David
Boyce's non-standard extensions. See C<perldoc ClearCase::Wrapper> for
more details.
=head1 CLEARTOOL ENHANCEMENTS
=over 4
=item * CATCS
=over 4
=item 1. New B<-expand> flag
Follows all include statements recursively in order to print a complete
config spec. When used with the B<-cmnt> flag, comments are stripped
from this listing.
=item 2. New B<-sources> flag
Prints all files involved in the config spec (the I<config_spec> file
itself plus any files it includes).
=item 3. New B<-attribute> flag
This introduces the concept of user-defined I<view attributes>. A view
attribute is a keyword-value pair embedded in the config spec using the
conventional notation
##:Keyword: value ...
The value of any attribute may be retrieved by running
<cmd-context> catcs -attr keyword ...
And to print all attributes:
<cmd-context> catcs -attr -all
=item 4. New B<-start> flag
Prints the I<preferred initial working directory> of a view by
examining its config spec. This is simply the value of the C<Start>
attribute as described above; in other words I<-start> is a synonym for
I<-attr Start>.
The B<workon> command (see) uses this value. E.g., using B<workon>
instead of I<setview> with the config spec:
##:Start: /vobs_fw/src/java
element * CHECKEDOUT
element * /main/LATEST
would set the view and automatically cd to C</vobs_fw/src/java>.
=back
=cut
sub catcs {
my(%opt, $op);
( run in 2.175 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )