/[svn2cvs]/trunk/svn2cvs.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/svn2cvs.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 42 by dpavlin, Sat Sep 22 13:57:28 2007 UTC revision 45 by dpavlin, Sun Sep 23 22:46:53 2007 UTC
# Line 375  foreach my $e ( @{ $xml->{'logentry'} } Line 375  foreach my $e ( @{ $xml->{'logentry'} }
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 ) {
# Line 388  foreach my $e ( @{ $xml->{'logentry'} } Line 390  foreach my $e ( @{ $xml->{'logentry'} }
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";

Legend:
Removed from v.42  
changed lines
  Added in v.45

  ViewVC Help
Powered by ViewVC 1.1.26