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"; |
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 |
|
|
114 |
} |
} |
115 |
} else { |
} else { |
116 |
open(SVNREV,"$CVSREP/.svnrev") || die "can't open $TMPDIR/$CVSREP/.svnrev: $!"; |
open(SVNREV,"$CVSREP/.svnrev") || die "can't open $TMPDIR/$CVSREP/.svnrev: $!"; |
117 |
my $rev = <SVNREV>; |
$rev = <SVNREV>; |
118 |
chomp($rev); |
chomp($rev); |
119 |
close(SVNREV); |
close(SVNREV); |
120 |
} |
} |
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'}; |