--- trunk/svn2cvs.pl 2007/08/20 08:37:22 30 +++ trunk/svn2cvs.pl 2007/09/05 20:39:29 31 @@ -293,14 +293,9 @@ my $msg = $e->{'msg'}; $msg =~ s/'/'\\''/g; # quote " - if ($action =~ /M/) { - if ( in_entries( $path ) ) { - print "svn2cvs: modify $path -- nop\n"; - } else { - print "WARNING: modify $path which isn't in CVS, adding...\n"; - log_system("$cvs add '$path'", "cvs add of $path failed"); - } - } elsif ($action =~ /A/) { + sub add_path { + my $path = shift || die "no path?"; + if (-d $path) { add_dir($path, $msg); } elsif ($path =~ m,^(.+)/[^/]+$, && ! -e "$1/CVS/Root") { @@ -310,6 +305,17 @@ } else { in_entries($path) || log_system("$cvs add '$path'", "cvs add of $path failed"); } + } + + if ($action =~ /M/) { + if ( in_entries( $path ) ) { + print "svn2cvs: modify $path -- nop\n"; + } else { + print "WARNING: modify $path which isn't in CVS, adding...\n"; + add_path($path); + } + } elsif ($action =~ /A/) { + add_path($path); } elsif ($action =~ /D/) { if (-e $path) { unlink $path || die "can't delete $path: $!";