293 |
my $msg = $e->{'msg'}; |
my $msg = $e->{'msg'}; |
294 |
$msg =~ s/'/'\\''/g; # quote " |
$msg =~ s/'/'\\''/g; # quote " |
295 |
|
|
296 |
if ($action =~ /M/) { |
sub add_path { |
297 |
if ( in_entries( $path ) ) { |
my $path = shift || die "no path?"; |
298 |
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/) { |
|
299 |
if (-d $path) { |
if (-d $path) { |
300 |
add_dir($path, $msg); |
add_dir($path, $msg); |
301 |
} elsif ($path =~ m,^(.+)/[^/]+$, && ! -e "$1/CVS/Root") { |
} elsif ($path =~ m,^(.+)/[^/]+$, && ! -e "$1/CVS/Root") { |
305 |
} else { |
} else { |
306 |
in_entries($path) || log_system("$cvs add '$path'", "cvs add of $path failed"); |
in_entries($path) || log_system("$cvs add '$path'", "cvs add of $path failed"); |
307 |
} |
} |
308 |
|
} |
309 |
|
|
310 |
|
if ($action =~ /M/) { |
311 |
|
if ( in_entries( $path ) ) { |
312 |
|
print "svn2cvs: modify $path -- nop\n"; |
313 |
|
} else { |
314 |
|
print "WARNING: modify $path which isn't in CVS, adding...\n"; |
315 |
|
add_path($path); |
316 |
|
} |
317 |
|
} elsif ($action =~ /A/) { |
318 |
|
add_path($path); |
319 |
} elsif ($action =~ /D/) { |
} elsif ($action =~ /D/) { |
320 |
if (-e $path) { |
if (-e $path) { |
321 |
unlink $path || die "can't delete $path: $!"; |
unlink $path || die "can't delete $path: $!"; |