[1246]$ pwd
/Users/brian/Dev
[1247]$ ls
Apache NPR iCab
Articles Net iphoto_shell
Business Netscape ora-weblog-stats
CGI_MetaFAQ Object orn-weblogs
CVSROOT-bdf Palm pause_id
CVSROOT-ns Pod pausecgi
CVSROOT-panix Polyglot pdf-rotate
CVSROOT-rss Test perlbrowser
ConfigReader Thoth perlfaq
Configs Tie release
Courses Tk scrathpad
Data XML scriptdist
Devel YAPJ text_density
HTML bin-personal use.perl
HTTP cpan weather
Mac doc2png weblint++
MacOSX grepurl weblogs.d
Module httpsniffer webreaper
####
:ext:comdog@cvs.brian-d-foy.sourceforge.net:/cvsroot/brian-d-foy
##
##
[1276]$ find . -name ROOT
./cpan/CVS/ROOT
./cpan/t/CVS/ROOT
./HTTP/Size/t/CVS/ROOT
./Test/CVS/ROOT
./Test/Data/CVS/ROOT
./Test/File/CVS/ROOT
./Test/File/lib/CVS/ROOT
./Test/ISBN/CVS/ROOT
./Test/ISBN/lib/CVS/ROOT
./Test/ISBN/t/CVS/ROOT
##
##
[1280]$ find . -name R[oO][oO][tT] | wc -l
347
##
##
[1286]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge"
./Business/ISBN/CVS/Root::ext:comdog@cvs.perl-isbn.sourceforge.net:/cvsroot/perl-isbn
./Business/ISBN/scripts/CVS/Root::ext:comdog@cvs.perl-isbn.sourceforge.net:/cvsroot/perl-isbn
./Business/ISBN/t/CVS/Root::ext:comdog@cvs.perl-isbn.sourceforge.net:/cvsroot/perl-isbn
./Business/ISBN-Data/CVS/Root::ext:comdog@cvs.perl-isbn.sourceforge.net:/cvsroot/perl-isbn
./Business/ISBN-Data/t/CVS/Root::ext:comdog@cvs.perl-isbn.sourceforge.net:/cvsroot/perl-isbn
##
##
find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null
| perl -lnaF: -e "$F[0] =~ s{^./}{}; print $F[0]"
Can't modify single ref constructor in substitution (s///) at -e line 1, near "s{^./}{};"
Execution of -e aborted due to compilation errors.
##
##
[1303]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne "print $F[0]"
ARRAY(0x800368)
ARRAY(0x800368)
ARRAY(0x800368)
##
##
[1305]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne "$, = ' <<<>>> '; print @F"
./Tie/Toggle/t/CVS/Root <<<>>> <<<>>> [snip...]
##
##
[1310]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne "print @{$F[0]}"
0
##
##
[1313]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne '$F[0] =~ s{^./}{}; print $F[0]'
weather/CVS/Root
weather/t/CVS/Root
##
##
[1319]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne '$F[0] =~ s{^./|/CVS/ROOT$}{}ig; print $F[0]' > bad_cvs_root.txt
##
##
#!/usr/bin/perl
use warnings;
use strict;
use File::Spec::Functions qw(catfile);
my $Base = "/Users/brian/Dev";
@ARGV = catfile( $Base, 'bad_cvs_root.txt' );
while( <> )
{
chomp;
my $dir = catfile( $Base, $_ );
print "checking $dir ...\n";
chdir $dir or do { warn "Could not chdir $dir: $!"; next };
my $output = `cvs update 2>&1`;
print $output;
print "-" x 73, "\n";
}
##
##
[1329]$ find . -name R[oO][oO][tT] | xargs grep -v "cvs.sourceforge" 2>/dev/null | perl -aF: -lne '$F[0] =~ s{^./}{}ig; print $F[0]' > bad_cvs_root_no_really.txt
##
##
#!/usr/bin/perl
use warnings;
use strict;
use IO::All;
use File::Spec::Functions qw(catfile);
my $Base = "/Users/brian/Dev";
@ARGV = catfile( $Base, 'bad_cvs_root_no_really.txt' );
while( <> )
{
chomp;
my $file = catfile( $Base, $_ );
my $contents < io( $file );
"$_^^^$contents" >> io( "cvs-root-originals.txt" );
$contents =~ s{comdog\@cvs\.(.*\.)sourceforge}
{comdog\@cvs\.sourceforge}i;
# $contents > io( $file );
print "$contents", "-" x 73, "\n";
}
##
##
[1351]$ more Business/ISBN/scripts/CVS/Root
Business/ISBN/scripts/CVS/Root: No such file or directory
##
##
[1352]$ pwd
/Users/brian/Desktop
[1353]$ more ~/Dev/Business/ISBN/scripts/CVS/Root
:ext:comdog@cvs.sourceforge.net:/cvsroot/perl-isbn
##
##
-------------------------------------------------------------------------
checking /Users/brian/Dev/Test/HTTPStatus...
cvs update: Updating .
cvs update: Updating lib
cvs update: Updating t
-------------------------------------------------------------------------
checking /Users/brian/Dev/Test/HTTPStatus/lib...
cvs update: Updating .
-------------------------------------------------------------------------
checking /Users/brian/Dev/Test/HTTPStatus/t...
cvs update: Updating .
##
##
checking /Users/brian/Dev/Business/ISBN ...
? t/untitled text 6
? t/xisbn.t
cvs update: Updating .
cvs update: Updating scripts
cvs update: Updating t
C t/load.t
C t/pod.t
cvs update: move away t/xisbn.t; it is in the way
C t/xisbn.t
-------------------------------------------------------------------------
checking /Users/brian/Dev/Business/ISBN/scripts...
cvs update: Updating .
-------------------------------------------------------------------------
checking /Users/brian/Dev/Business/ISBN/t...
? untitled text 6
? xisbn.t
cvs update: Updating .
C load.t
C pod.t
cvs update: move away ./xisbn.t; it is in the way
C xisbn.t
##
##
#!/usr/bin/perl
use warnings;
use strict;
use File::Spec::Functions qw(catfile);
my $Base = "/Users/brian/Dev";
@ARGV = catfile( $Base, 'bad_cvs_root.txt' );
my %Seen = ();
while( <> )
{
chomp;
my $top_level = (split m|/|, $_)[0]; # ugh, not portable
next if exists $Seen{ $top_level };
$Seen{ $top_level } ++;
my $dir = catfile( $Base, $top_level );
print "checking $dir ... ";
chdir $dir or do { warn "Could not chdir $dir: $!"; next };
my @output = `cvs update 2>&1`;
my $message = parse_cvs( @output );
print $message ? "\n$message" : "up-to-date\n";
}
sub parse_cvs
{
my %cvs_state;
my %message = (
C => 'These files have conflicts',
M => 'These files have not been checked in',
U => 'These files were missing and have been updated',
A => 'These files were added but not checked in',
'?' => q|I don't know about these files|,
);
my @cvs_states = keys %message;
foreach my $state ( @cvs_states )
{
my $regex = qr/^\Q$state /;
$cvs_state{$state} = [
map { my $x = $_; $x =~ s/$regex//; $x }
grep /$regex/, @_
];
}
local $" = "\t";
my $rule = "-" x 50;
my $string = '';
foreach my $key ( sort keys %cvs_state )
{
my $list = $cvs_state{$key};
next unless @$list;
$string .= sprintf "\t$message{$key}\n\t$rule\n\t@$list\n\n";
}
return $string;
}
##
##
checking /Users/brian/Dev/Tie ...
These files have conflicts
--------------------------------------------------
Cycle/t/pod.t
These files have not been checked in
--------------------------------------------------
Toggle/t/pod.t
checking /Users/brian/Dev/use.perl ...
These files have not been checked in
--------------------------------------------------
journal_reader/_journal.tmpl
checking /Users/brian/Dev/weather ...
I don't know about these files
--------------------------------------------------
.lwpcookies
These files have not been checked in
--------------------------------------------------
t/pod.t
checking /Users/brian/Dev/weblint++ ...
These files have not been checked in
--------------------------------------------------
weblint++
t/pod.t