/[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 10 by dpavlin, Thu Mar 11 16:48:38 2004 UTC revision 11 by dpavlin, Sat Mar 13 15:44:04 2004 UTC
# Line 62  sub commit_svnrev { Line 62  sub commit_svnrev {
62          } else {          } else {
63                  my $msg="subversion revision $rev commited to CVS";                  my $msg="subversion revision $rev commited to CVS";
64                  print "$msg\n";                  print "$msg\n";
65                  system "$cvs commit -m \"$msg\" $path" || die "cvs commit of $path failed: $!";                  system "$cvs commit -m '$msg' $path" || die "cvs commit of $path failed: $!";
66          }          }
67  }  }
68    
# Line 185  print "## tmppath: $tmppath tmpsvn: $tmp Line 185  print "## tmppath: $tmppath tmpsvn: $tmp
185                  }                  }
186    
187                  my $msg = $e->{'msg'};                  my $msg = $e->{'msg'};
188                  $msg =~ s/"/\\"/g;      # quote "                  $msg =~ s/'/\\'/g;      # quote "
189    
190                  if ($action =~ /M/) {                  if ($action =~ /M/) {
191                          print "svn2cvs: modify $path -- nop\n";                          print "svn2cvs: modify $path -- nop\n";
192                  } elsif ($action =~ /A/) {                  } elsif ($action =~ /A/) {
193                          if (-d $path) {                          if (-d $path) {
194                                  chdir($path) || die "can't cd into dir $path for import: $!";                                  chdir($path) || die "can't cd into dir $path for import: $!";
195                                  log_system("$cvs import -d -m \"$msg\" $CVSREP/$path svn r$rev", "cvs import of $path failed");                                  log_system("$cvs import -d -m '$msg' $CVSREP/$path svn r$rev", "cvs import of $path failed");
196                                  chdir("$TMPDIR") || die "can't cd to $TMPDIR/$CVSREP: $!";                                  chdir("$TMPDIR") || die "can't cd to $TMPDIR/$CVSREP: $!";
197                                  log_system("$cvs checkout $CVSREP/$path", "cvs checkout of imported dir $path failed");                                  log_system("$cvs checkout $CVSREP/$path", "cvs checkout of imported dir $path failed");
198                                  chdir("$TMPDIR/$CVSREP") || die "can't cd back to $TMPDIR/$CVSREP: $!";                                  chdir("$TMPDIR/$CVSREP") || die "can't cd back to $TMPDIR/$CVSREP: $!";
199                          } else {                          } else {
200                                  log_system("$cvs add -m \"$msg\" $path", "cvs add of $path failed");                                  log_system("$cvs add -m '$msg' $path", "cvs add of $path failed");
201                          }                          }
202                  } elsif ($action =~ /D/) {                  } elsif ($action =~ /D/) {
203                          log_system("$cvs delete -m \"$msg\" $path", "cvs delete of $path failed");                          log_system("$cvs delete -m '$msg' $path", "cvs delete of $path failed");
204                  } else {                  } else {
205                          print "WARNING: action $action not implemented on $path. Bug or missing feature of $0\n";                          print "WARNING: action $action not implemented on $path. Bug or missing feature of $0\n";
206                  }                  }
207    
208                  # now commit changes                  # now commit changes
209                  log_system("$cvs commit -m \"$msg\" $path", "cvs commit of $path failed");                  log_system("$cvs commit -m '$msg' $path", "cvs commit of $path failed");
210    
211          }          }
212    

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26