X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FClearcase%2FVob.pm;h=ca4f76519021cd34e4d4e5ebf4c39aa9d6c4df32;hb=e907bf835bb61d8888f2fcd59c90bd071e841cf7;hp=397c36820620a32e4556743deb9b0e229a9f0d0d;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/lib/Clearcase/Vob.pm b/lib/Clearcase/Vob.pm index 397c368..ca4f765 100644 --- a/lib/Clearcase/Vob.pm +++ b/lib/Clearcase/Vob.pm @@ -264,6 +264,10 @@ Returns: return $self->{shost}; } # shost +# Alias name to tag +sub name() { + goto &tag; +} # name sub access () { my ($self) = @_; @@ -1177,8 +1181,8 @@ Returns: return !$status; } # exists -sub create (;$$$) { - my ($self, $host, $vbs, $comment) = @_; +sub create (;$$$%) { + my ($self, $host, $vbs, $comment, %opts) = @_; =pod @@ -1232,20 +1236,28 @@ Ouput from cleartool return (0, ()) if $self->exists; - $comment = Clearcase::setComment $comment; + $comment = Clearcase::_setComment $comment; my ($status, @output); + my $additionalOpts = ''; + + for (keys %opts) { + $additionalOpts .= "-$_ "; + $additionalOpts .= "$opts{$_} " if $opts{$_}; + } # for + if ($host && $vbs) { + $additionalOpts .= '-ucmproject' if $self->{ucmproject}; + ($status, @output) = $Clearcase::CC->execute ( - "mkvob -tag $self->{tag} $comment -host $host -hpath $vbs " + "mkvob -tag $self->{tag} $comment $additionalOpts -host $host -hpath $vbs " . "-gpath $vbs $vbs"); } else { # Note this requires that -stgloc's work and that using -auto is not a # problem. ($status, @output) = - $Clearcase::CC->execute ("mkvob -tag $self->{tag} $comment " - . "-stgloc -auto"); + $Clearcase::CC->execute ("mkvob -tag $self->{tag} $comment $additionalOpts -stgloc -auto"); } # if $self->updateVobInfo; @@ -1343,9 +1355,9 @@ sub updateVobInfo ($$) { =head3 ClearSCM Perl Modules -=for html

Clearcase

+=for html

Clearcase

-=for html

OSdep

+=for html

OSdep

=head2 BUGS AND LIMITATIONS