9 print STDERR
"Usage:$0 <old_author_exp> <new_author_exp> [svn_dump_file]\n";
15 next unless /^Revision-number:\s+\d+$/;
17 # Grab the content lengths. Examples:
18 # Prop-content-length: 139
23 unless ( $plen_line =~ /^Prop-content-length:\s+\d+$/ ) {
24 # Nothing we want to change.
25 print $plen_line, $clen_line;
31 if ( /^PROPS-END$/ ) {
33 print $plen_line, $clen_line, @lines, $_;
39 if ( /^svn:author$/ ) {
40 # Grab the author content length. Example:
44 # Grab the author name.
46 my $old_length = length($auth);
47 print STDERR
'<',"$auth\n";
48 if ( $auth =~ s/$old_exp/$new_exp/ ) {
49 my $new_length = length($auth);
50 # Adjust the content lengths.
51 for my $line ( $plen_line, $clen_line, $alen_line ) {
52 $line =~ s/(\d+)$/$1 + $new_length - $old_length/e;
54 print STDERR
'>',"$auth\n";
56 print $plen_line, $clen_line, @lines, $alen_line, $auth;