/[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 3 by dpavlin, Tue Mar 9 21:45:32 2004 UTC revision 5 by dpavlin, Tue Mar 9 22:04:14 2004 UTC
# Line 18  use XML::Simple; Line 18  use XML::Simple;
18  my $HOME = $ENV{'HOME'} || die "can't get home directory!";  my $HOME = $ENV{'HOME'} || die "can't get home directory!";
19    
20  # cvsroot directory  # cvsroot directory
21  my $CVSROOT="$HOME/x/cvsroot";  #my $CVSROOT="$HOME/x/cvsroot";
22    my $CVSROOT=':pserver:dpavlin@cvs.tigris.org:/cvs';
23  # name of cvs repository to commit to  # name of cvs repository to commit to
24  my $CVSREP="svn2cvs";  my $CVSREP="svn2cvs/src";
25    
26  # svnroot directory  # svnroot directory
27  my $SVNROOT="file://$HOME/private/svn/svn2cvs";  my $SVNROOT="file://$HOME/private/svn/svn2cvs";
# Line 67  sub commit_svnrev { Line 68  sub commit_svnrev {
68    
69          if ($add_new) {          if ($add_new) {
70                  system "$cvs add $CVSREP/$path" || die "cvs add of $path failed: $!";                  system "$cvs add $CVSREP/$path" || die "cvs add of $path failed: $!";
71            } else {
72                    my $msg="subversion revision $rev commited to CVS";
73                    print "$msg\n";
74                    system "$cvs commit -m \"$msg\" $CVSREP/$path" || die "cvs commit of $path failed: $!";
75          }          }
   
         my $msg="subversion revision $rev commited to CVS";  
         print "$msg\n";  
         system "$cvs commit -m \"$msg\" $CVSREP/$path" || die "cvs commit of $path failed: $!";  
76  }  }
77    
78    
# Line 155  if (! $xml->{'logentry'}) { Line 156  if (! $xml->{'logentry'}) {
156          exit 0;          exit 0;
157  }  }
158    
 print Dumper($xml);  
   
159  foreach my $e (@{$xml->{'logentry'}}) {  foreach my $e (@{$xml->{'logentry'}}) {
160          die "BUG: revision from .svnrev ($rev) greater than from subversion (".$e->{'revision'}.")" if ($rev > $e->{'revision'});          die "BUG: revision from .svnrev ($rev) greater than from subversion (".$e->{'revision'}.")" if ($rev > $e->{'revision'});
161          $rev = $e->{'revision'};          $rev = $e->{'revision'};

Legend:
Removed from v.3  
changed lines
  Added in v.5

  ViewVC Help
Powered by ViewVC 1.1.26