X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FClearcase%2FVob.pm;h=142c1dc2b66cfdb6b6b6082b54ea9f4a442d5252;hb=1140ca8d56832ae529db0f353112ac192cdf9432;hp=6c957c079bbed2d847f5c5042300bca2adbcdcd3;hpb=f1cceb09b35ca7c9052622fd3e4eb2767916aab9;p=clearscm.git diff --git a/lib/Clearcase/Vob.pm b/lib/Clearcase/Vob.pm index 6c957c0..142c1dc 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,26 @@ 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) { ($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;