From: Rob H. <for...@us...> - 2002-06-19 07:19:06
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv30079/lib/SandWeb/Repository Modified Files: cvs.pm Log Message: explicit check for the existence of the reference to the log object in some places, so that the tests will run. There must be a better way, maybe we can create the log object in the test and pass it to the Repository object? Not critical, would be nice though. Index: cvs.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -U2 -r1.24 -r1.25 --- cvs.pm 19 Jun 2002 07:09:00 -0000 1.24 +++ cvs.pm 19 Jun 2002 07:19:04 -0000 1.25 @@ -107,7 +107,9 @@ if ($message) { push @param, " -m $message" }; - $log->debug("Performing add operation"); - $log->debug("Params: @param"); - $log->debug("File: $file"); + if ($log) { + $log->debug("Performing add operation"); + $log->debug("Params: @param"); + $log->debug("File: $file"); + } my $output = $self->shell( 'param' => join('', @param), @@ -215,7 +217,9 @@ if ($date) { push @param, " $date" }; - $log->debug("Performing checkout operation"); - $log->debug("Params: @param"); - $log->debug("File: $file"); + if ($log) { + $log->debug("Performing checkout operation"); + $log->debug("Params: @param"); + $log->debug("File: $file"); + } my $output = $self->shell( 'param' => join('', @param), @@ -263,7 +267,9 @@ } else { push @param, " -m \"$message\""; - $log->debug("Performing commit operation"); - $log->debug("Params: @param"); - $log->debug("File: $file"); + if ($log) { + $log->debug("Performing commit operation"); + $log->debug("Params: @param"); + $log->debug("File: $file"); + } $output = $self->shell( 'param' => join('', @param), @@ -634,7 +640,9 @@ if ($recurse) { push @param, " -R" }; - $log->debug("Performing remove operation"); - $log->debug("Params: @param"); - $log->debug("File: $file"); + if ($log) { + $log->debug("Performing remove operation"); + $log->debug("Params: @param"); + $log->debug("File: $file"); + } my $output = $self->shell( 'param' => join('', @param), @@ -965,5 +973,7 @@ } - $log->debug("Creating Shell object"); + if ($log) { + $log->debug("Creating Shell object"); + } my $shell = SandWeb::Shell->new( 'vcs_username' => "$vcs_username", |