my ($self, %opts) = @_;
my $opts;
-
+
for (keys %opts) {
if ($_ eq 'cq' or $_ eq 'cqe' or $_ eq 'force' or $_ eq 'nc') {
$opts .= "-$_ ";
$opts .= "-$_ $opts{$_}";
} # if
} # for
-
-
+
return $opts;
} # _processOpts
name => $baseline,
pvob => $pvob,
}, $class; # bless
-
+
return $class;
} # new
sub name() {
my ($self) = @_;
-
+
=pod
=head2 name
sub pvob() {
my ($self) = @_;
-
+
=pod
=head2 pvob
return $self->{pvob};
} # pvob
-
+
sub create($;$$$) {
my ($self, $view, $comment, $opts) = @_;
=for html </blockquote>
=cut
-
+
$opts ||= '';
-
+
$comment = Clearcase::_setComment $comment;
return $Clearcase::CC->execute(
=cut
$opts ||= '';
-
+
return $Clearcase::CC->execute(
"rmbl $opts -force " . $self->{name} . '@' . $self->{pvob}->name
);
sub diff($;$$) {
my ($self, $type, $baseline, %opts) = @_;
-
+
=pod
=head2 diff
croak "Type must be one of activities, versions or baselines in "
. "Clearcase::UCM::Baseline::diff - not $type";
} # unless
-
+
my $myBaseline = "$self->{name}\@$self->{pvob}";
-
+
my $cmd = "diffbl -$type";
-
+
if ($baseline) {
if ($baseline =~ /(\S+):/) {
unless ($1 eq 'baseline' or $1 eq 'stream') {
. "just <baseline>";
} # unless
} # if
-
+
$baseline .= "\@$self->{pvob}" unless $baseline =~ /\@/;
-
+
$cmd .= " $myBaseline $baseline";
} else {
$cmd .= " -predeccsor";
} # if
-
+
$Clearcase::CC->execute($cmd);
-
+
return if $Clearcase::CC->status;
-
+
my @output = $Clearcase::CC->output;
my %info;
-
+
for (@output) {
next unless /^(\>\>|\<\<)/;
-
+
if (/(\>\>|\<\<)\s+(\S+)\@/) {
$info{$2} = Clearcase::UCM::Activity->new($2, $self->{pvob});
} # if
} # for
-
+
return %info;
} # diff