+++ /dev/null
-$/ = 'File:';
-
-my $compress = 0;
-my $short = 0;
-my $cvs_args = '';
-my $process_cvs_args = 0;
-my $debug = 0;
-my $revision = 0;
-
-# Command line switches
-foreach (@ARGV)
-{
- if ($process_cvs_args)
- {
- $cvs_args .= " $_";
- }
-# If true, do not show up to date files without sticky tag
- $compress = 1 if (m/-c/);
-# Show current revision number
- $revision = 1 if (m/-r/);
-# Abbreviate repository path
- $short = 1 if (m/-s/);
- $debug = 1 if (m/-d/);
- $process_cvs_args = 1 if (m/^--$/);
-}
-
-my $format = '(\S+)\s*Status: (.+)\s*Working revision:\s*(\S+)'
- . '\s*Repository revision:\s*(\S+)\s*(\S+)'
- . '\s*Sticky Tag:\s*(.+)'
- . '\s*Sticky Date:\s*(.+)'
- . '\s*Sticky Options:\s*(.+)'
- ;
-
-print STDERR "cvs status $cvs_args |" if ($debug);
-open CVS, "cvs status $cvs_args |";
-
-while(<CVS>)
-{
- next if (m/^\?/);
- next if (m/^===================================================================/);
- if (m/$format/)
- {
- my $file = $1;
- my $status = $2;
- my $work = $3;
- my $rep = $4;
- my $rep_file = $5;
- my $tag = $6;
- my $date = $7;
- my $opt = $8;
-
- $rep_file =~ s!/home/people/cvs/deal/!!;
- $rep_file =~ s!,v!!;
-
- if ($status eq 'Up-to-date')
- {
- $status = 'OK ';
- $status .= "$work " if ($revision);
- } elsif ($status eq 'Needs Patch')
- {
- $status = "P $work<-$rep ";
- } elsif ($status eq 'Locally Modified')
- {
- $status = "M $work->$rep ";
- } else {
- $status = "$status $work $rep ";
- }
-
- $tag =~ s/ .*//;
- $tag = '' if ($tag eq '(none)');
- $date = '' if ($date eq '(none)');
- $opt = '' if ($opt eq '(none)');
-# $opt = '' if ($opt eq '-kk');
- my $stick = $tag . $date . $opt;
- $stick = "$stick" unless ($stick eq '');
- $status .= $stick;
- printf "%-40s %-30s %s\n", $file, $status,
- (($short) ? '' : $rep_file)
- unless ($compress && ($status =~ m/OK (\d+\.\d+(\.\d+\.\d+)? )?$/));
- }
- else
- {
- print STDERR "Ignored:\n$_\n",
- "===================================================================\n"
- if ($debug);
- }
-}