14 |
|
# (encrypted) |
15 |
|
# invokecvs(@cmds) : invoke a cvs command supplied in @cmds |
16 |
|
# repository : return a string to indicate the repository |
17 |
< |
# |
17 |
> |
# |
18 |
> |
|
19 |
|
package Utilities::CVSmodule; |
20 |
|
require Exporter; |
21 |
|
use Utilities::AddDir; |
28 |
|
bless $self, $class; |
29 |
|
$self->{myenv}={}; |
30 |
|
$self->{cvs}='cvs'; |
30 |
– |
# $self->{cvs}='/usr/local/bin/cvs'; |
31 |
|
# Reset All variables |
32 |
|
$self->{auth}=""; |
33 |
|
$self->{passkey}=""; |
34 |
|
$self->{user}=""; |
35 |
|
$self->{base}=""; |
36 |
– |
# $self->{passbase}=$ENV{HOME}."/.cvspass"; |
36 |
|
$self->set_passbase("/tmp/".$>."CVSmodule/.cvspass"); |
37 |
|
return $self; |
38 |
|
} |
78 |
|
$self=shift; |
79 |
|
$self->{auth}=shift; |
80 |
|
$self->{auth}=~s/^\:*(.*)\:*/\:$1\:/; |
81 |
+ |
|
82 |
|
$self->_updatecvsroot(); |
83 |
|
} |
84 |
|
|
91 |
|
sub invokecvs { |
92 |
|
$self=shift; |
93 |
|
@cmds=@_; |
94 |
< |
#make sure weve got the right environment |
94 |
> |
# make sure weve got the right environment |
95 |
|
foreach $key ( %{$self->{myenv}} ) { |
96 |
|
$ENV{$key}=$self->{myenv}{$key}; |
97 |
|
} |
98 |
< |
#now perform the cvs command |
99 |
< |
#print ( join ' ', ( $self->{cvs}, "-d", $self->{cvsroot}, @cmds, "\n" )); |
98 |
> |
# now perform the cvs command |
99 |
|
return ( system( "$self->{cvs}" ,"-Q", "-d", "$self->{cvsroot}", @cmds )); |
100 |
|
} |
101 |
|
|