diff options
author | David Prévot <taffit-guest> | 2011-05-03 18:39:46 +0000 |
---|---|---|
committer | David Prévot <taffit-guest> | 2011-05-03 18:39:46 +0000 |
commit | dbde8d47ee9bd3a0012be51d88c2bfc5790852e4 (patch) | |
tree | bedf6fae01de419fff78940096c1e0f2ba79bfbc | |
parent | 3ca019a805ad586ffc1b4471d3c1d4f514410023 (diff) |
Add a quiet option for non existing files
CVS version numbers
remove_stale.pl: 1.20 -> 1.21
Perl/Local/VCS_CVS.pm: 1.11 -> 1.12
-rw-r--r-- | Perl/Local/VCS_CVS.pm | 5 | ||||
-rwxr-xr-x | remove_stale.pl | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Perl/Local/VCS_CVS.pm b/Perl/Local/VCS_CVS.pm index c41a6866588..e5b53d65507 100644 --- a/Perl/Local/VCS_CVS.pm +++ b/Perl/Local/VCS_CVS.pm @@ -267,6 +267,9 @@ Example use: sub vcs_file_info { my $file = shift or carp("No file specified"); + my %options = @_; + + my $quiet = $options{quiet} || undef; my ($basename,$dirname) = fileparse( rel2abs $file ); @@ -275,7 +278,7 @@ sub vcs_file_info if ( not ( exists $info{$basename} and $info{$basename} ) ) { - carp("No info found about `$file' (does the file exist?)"); + carp("No info found about `$file' (does the file exist?)") if ( ! $quiet ); return; } diff --git a/remove_stale.pl b/remove_stale.pl index 565719e98fa..970480f7a64 100755 --- a/remove_stale.pl +++ b/remove_stale.pl @@ -150,7 +150,7 @@ sub find_stale_files my $haswml = exists( $wmlfiles{$source} ) || -f $source || 0; # is the html file checked in the VCS? - my $checkedin = vcs_file_info($htmlfile) ? 1 : 0; + my $checkedin = vcs_file_info($htmlfile , quiet => 1 ) ? 1 : 0; #if ($checkedin) #{ print "==> `$htmlfile' : `$source' : $haswml : $checkedin\n"; } |