summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-02-18 10:34:09 (GMT)
committerEric Wong <normalperson@yhbt.net>2007-02-23 08:57:13 (GMT)
commit0dfaf0a4e1905a9137d3f2f691620529aeb3b4fa (patch)
tree014cc67e9070476560f97c983a850267156295de /git-svn.perl
parenta81ed0b63edb0d473e17e078de2269b735156a79 (diff)
downloadgit-0dfaf0a4e1905a9137d3f2f691620529aeb3b4fa.zip
git-0dfaf0a4e1905a9137d3f2f691620529aeb3b4fa.tar.gz
git-0dfaf0a4e1905a9137d3f2f691620529aeb3b4fa.tar.bz2
git-svn: allow metadata options to be specified with 'init' and 'clone'
Since the options that affect the way metadata is handled in git-svn, should be consistently set/unset throughout history imported by git-svn; it makes sense to allow the user to set certain options from the command-line that will write to the config file when initially creating the repository. Also, fix some formatting issues while we're updating documentation. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 1bcf058..dc78dcf 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -75,9 +75,14 @@ my %fc_opts = ( 'follow-parent|follow!' => \$Git::SVN::_follow_parent,
%remote_opts );
my ($_trunk, $_tags, $_branches);
+my %icv;
my %init_opts = ( 'template=s' => \$_template, 'shared:s' => \$_shared,
'trunk|T=s' => \$_trunk, 'tags|t=s' => \$_tags,
'branches|b=s' => \$_branches, 'prefix=s' => \$_prefix,
+ 'no-metadata' => sub { $icv{noMetadata} = 1 },
+ 'use-svm-props' => sub { $icv{useSvmProps} = 1 },
+ 'use-svnsync-props' => sub { $icv{useSvnsyncProps} = 1 },
+ 'rewrite-root=s' => sub { $icv{rewriteRoot} = $_[1] },
%remote_opts );
my %cmt_opts = ( 'edit|e' => \$_edit,
'rmdir' => \$SVN::Git::Editor::_rmdir,
@@ -234,6 +239,14 @@ sub do_git_init_db {
}
command_noisy(@init_db);
}
+ my $set;
+ my $pfx = "svn-remote.$Git::SVN::default_repo_id";
+ foreach my $i (keys %icv) {
+ die "'$set' and '$i' cannot both be set\n" if $set;
+ next unless defined $icv{$i};
+ command_noisy('config', "$pfx.$i", $icv{$i});
+ $set = $i;
+ }
}
sub init_subdir {