ClearCase-Wrapper-MGi
view release on metacpan or search on metacpan
if ($path eq '.') {
$path = ''; last
}
if ($path eq '..') {
$path = ''; $p = dirname($p); last;
}
last if $path =~ m%^\.[^/]%;
}
$path = $path? catfile($p, $path) : $p;
}
if (!$stop) {
my $tag = $CT->des(['-s'], "vob:$path")->qx;
$stop = length($1) if $path =~ m%^(.*?\Q$tag\E)%;
}
_Recpath($anc, 1, $path, $stop);
$stop = 0;
}
} elsif ($type !~ /version$/) {
return; # Non reachable or dangling
}
my $pn = rel2abs($n); # if 'a/' with 'a' a symlink, yields 'a', but vob remote
if (!$stop) {
my $tag = $CT->des(['-s'], "vob:$n")->qx;
$stop = length($1) if $pn =~ m%^(.*?\Q$tag\E)%;
}
$pn = $CT->des([(qw(-fmt %En))], $pn)->qx if $pn =~ /@/; #version ext. name
my $dad = dirname($pn);
return if length($dad) < $stop;
$anc->{$dad}++;
_Recpath($anc, 1, $dad, $stop);
}
sub _RecLock {
my $obj = shift;
my (@lock) = $CT->lslock([qw(-fmt %d\n%u\n%Nc)], $obj)->qx;
my @args = ();
if (@lock) {
my $date = shift @lock;
my $user = shift @lock;
my @cmt;
for (@lock) {
if (m%^Locked except for users:\s+(.*)%) {
push @args, '-nusers', grep{s/ /,/g} $1;
} elsif (/^Locked for all users( \(obsolete\))?\.$/) {
push @args, '-obs' if $1;
} else {
push @cmt, $_;
}
}
unshift @cmt, "Relocked to mkhlink. Locked on $date by $user";
push @args, '-c', join('\n',@cmt), $obj;
}
return @args;
}
=head1 NAME
ClearCase::Wrapper::MGi - Support for an alternative to UCM.
=head1 SYNOPSIS
This is an C<overlay module> for B<ClearCase::Wrapper> containing Marc
Girod's non-standard extensions. See C<perldoc ClearCase::Wrapper> (by
David Boyce) for more details.
The alternative to UCM consists in a novel branching model, and a concept
of incremental types.
=head1 CLEARTOOL EXTENSIONS
=over 2
=item * LSGENEALOGY
New command. B<LsGenealogy> is an alternative way to display the
version tree of an element. It will treat merge arrows on a par level
with parenthood on a branch, and will navigate backwards from the
version currently selected, to find what contributors took part in its
state.
This is thought as being particularly adapted to displaying the
bush-like structure characteristic of version trees produced under the
advocated branching strategy.
Flags:
=over 1
=item B<-all>
Show 'uninteresting' versions, otherwise skipped:
=over 1
=item - bearing no label
=item - not at a chain boundary.
=back
Note that a different algorithm is used with and without the C<-all> option.
The latter uses C<lsvtree> and may thus be slow on elements with a large
version tree. The former is thus more scalable.
=item B<-obsolete>
Add obsoleted branches to the search.
=item B<-short>
Skip displaying labels and 'labelled' versions and do not report
alternative paths or siblings.
=item B<-fmt>
Substitute to the default representation of every version (optionally
including labels), the output of C<des -fmt 'format' version>.
The indentation is preserved, but all the verbose annotations
(offspring, siblings, alternatives) are stripped (as in B<short>
mode).
=item B<-depth>
( run in 2.731 seconds using v1.01-cache-2.11-cpan-5a3173703d6 )