Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b4f04fc225
Fetching contributors…

Cannot retrieve contributors at this time

executable file 31 lines (29 sloc) 0.912 kb
#!/usr/bin/perl
open (MAP, "<".$ENV{"COMMIT_MAP"});
my %revmap;
while (defined ($line = <MAP>)) {
chomp $line;
if ($line =~ /^([^ ]*) (.*)$/) {
$revmap{"$1"} = "$2";
}
}
close (MAP);
my $svn_ref_dir_path=$ENV{"SVN_REF_DIR"};
opendir( SVN_REF_DIR, $svn_ref_dir_path) || die "cannot open $svn_ref_dir_path";
while (my $file = readdir SVN_REF_DIR) {
next unless (-f "$svn_ref_dir_path/$file");
open (FILE, "<$svn_ref_dir_path/$file");
my $orig_commit = <FILE>;
chomp $orig_commit;
my $new_commit = $revmap{"$orig_commit"};
if ( ! defined($new_commit) ) {
print "Failed to find remapping for svn rev $file with original commit id ".$orig_commit."\n";
} else {
print "$file -> $file ($orig_commit -> $new_commit)\n";
close(FILE);
open (FILE, ">$svn_ref_dir_path/$file");
print FILE $new_commit."\n";
}
close(FILE);
}
closedir (SVN_REF_DIR);
Jump to Line
Something went wrong with that request. Please try again.