375 |
add_path($path); |
add_path($path); |
376 |
} elsif ( $action =~ /D/ ) { |
} elsif ( $action =~ /D/ ) { |
377 |
if ( -e $path ) { |
if ( -e $path ) { |
378 |
if ( -d $path ) { |
if ( ! in_entries( $path ) ) { |
379 |
|
print "WARNING: $path is not present in CVS, skipping...\n"; |
380 |
|
undef $path; |
381 |
|
} elsif ( -d $path ) { |
382 |
warn "#### remove directory: $path"; |
warn "#### remove directory: $path"; |
|
my @sub_commit; |
|
383 |
foreach my $f ( entries($path) ) { |
foreach my $f ( entries($path) ) { |
384 |
$f = "$path/$f"; |
$f = "$path/$f"; |
385 |
if ( -f $f ) { |
if ( -f $f ) { |
390 |
} |
} |
391 |
log_system( "$cvs delete '$f'", |
log_system( "$cvs delete '$f'", |
392 |
"cvs delete of file $f failed" ); |
"cvs delete of file $f failed" ); |
393 |
push @sub_commit, $f; |
cvs_commit( $msg, $f ); |
394 |
} |
} |
395 |
log_system( "$cvs delete '$path'", |
log_system( "$cvs delete '$path'", |
396 |
"cvs delete of file $path failed" ); |
"cvs delete of file $path failed" ); |
397 |
cvs_commit( $msg, @sub_commit, $path ); |
cvs_commit( $msg, $path ); |
398 |
log_system( |
log_system( "$cvs update -dP .", |
399 |
"$cvs update -dP '$path'", |
"cvs update -dP . failed" ); |
|
"cvs update -dP $path failed" |
|
|
); |
|
400 |
undef $path; |
undef $path; |
401 |
} else { |
} else { |
402 |
warn "#### remove file: $path"; |
warn "#### remove file: $path"; |
403 |
unlink($path) || die "can't delete $path: $!"; |
unlink($path) || die "can't delete $path: $!"; |
404 |
log_system( "$cvs delete '$path'", |
log_system( "$cvs delete '$path'", |
405 |
"cvs delete of dir $path failed" ); |
"cvs delete of dir $path failed" ); |
406 |
|
cvs_commit( $msg, $path ); |
407 |
|
undef $path; |
408 |
} |
} |
409 |
} else { |
} else { |
410 |
print "WARNING: $path is not present, skipping...\n"; |
print "WARNING: $path is not present, skipping...\n"; |