Shin'ya M. > Initializing repository with 4 items... done
This commit is contained in:
20
svn2git
Normal file
20
svn2git
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env perl
|
||||
# Convert SVN repositories to Git
|
||||
# Requirements:
|
||||
# - git
|
||||
# - reposurgeon
|
||||
# - svn
|
||||
# - direct access to the subversion server
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
require("./svn2git.conf");
|
||||
|
||||
my $subversion_repo_path;
|
||||
my $git_repo_path;
|
||||
my $repo_name;
|
||||
|
||||
print "Dumping the SVN repository: ($repo_name)\n";
|
||||
system("svnadmin dump $subversion_repo_path > $repo_name.dump") or die "Either svnadmin is not installed or there was a runtime error";
|
||||
print "Converting the repository into Git ($repo_name)\n";
|
||||
system("reposurgeon 'read <$repo_name.dump' 'prefer git' 'rebuild $git_repo_path'") or die "Either reposurgeon is not installed or there was a runtime error";
|
||||
Reference in New Issue
Block a user