/[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 30 by dpavlin, Mon Aug 20 08:37:22 2007 UTC revision 31 by dpavlin, Wed Sep 5 20:39:29 2007 UTC
# Line 293  foreach my $e (@{$xml->{'logentry'}}) { Line 293  foreach my $e (@{$xml->{'logentry'}}) {
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") {
# Line 310  foreach my $e (@{$xml->{'logentry'}}) { Line 305  foreach my $e (@{$xml->{'logentry'}}) {
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: $!";

Legend:
Removed from v.30  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26