Move initialization of Git::SVN variables into Git::SVN.

Also it can compile on its own now, yay! Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>

Michael G. Schwern committed Jul 26, 2012 at 16:22 UTC 5c71028fced46d03bf81b8625680d9ac87c8f4f0
3 files changed +9 -7
git-svn.perl
-4
@@ -20,10 +20,7 @@ my $cmd_dir_prefix = eval {
20
21 my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
22 $ENV{GIT_DIR} ||= '.git';
23 -$Git::SVN::default_repo_id = 'svn';
24 -$Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
23 $Git::SVN::Ra::_log_window_size = 100;
26 -$Git::SVN::_minimize_url = 'unset';
24
25 if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
26 $ENV{SVN_SSH} = $ENV{GIT_SSH};
@@ -114,7 +111,6 @@ my ($_stdin, $_help, $_edit,
111 # This is a refactoring artifact so Git::SVN can get at this git-svn switch.
112 sub opt_prefix { return $_prefix || '' }
113
117 -$Git::SVN::_follow_parent = 1;
114 $Git::SVN::Fetcher::_placeholder_filename = ".gitignore";
115 $_q ||= 0;
116 my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
perl/Git/SVN.pm
+7 -2
@@ -3,9 +3,9 @@ use strict;
3 use warnings;
4 use Fcntl qw/:DEFAULT :seek/;
5 use constant rev_map_fmt => 'NH40';
6 -use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent
6 +use vars qw/$_no_metadata
7 $_repack $_repack_flags $_use_svm_props $_head
8 - $_use_svnsync_props $no_reuse_existing $_minimize_url
8 + $_use_svnsync_props $no_reuse_existing
9 $_use_log_author $_add_author_from $_localtime/;
10 use Carp qw/croak/;
11 use File::Path qw/mkpath/;
@@ -30,6 +30,11 @@ BEGIN {
30 $can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
31 }
32
33 +our $_follow_parent = 1;
34 +our $_minimize_url = 'unset';
35 +our $default_repo_id = 'svn';
36 +our $default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
37 +
38 my ($_gc_nr, $_gc_period);
39
40 # properties that we do not log:
t/Git-SVN/00compile.t
+2 -1
@@ -3,6 +3,7 @@
3 use strict;
4 use warnings;
5
6 -use Test::More tests => 1;
6 +use Test::More tests => 2;
7
8 require_ok 'Git::SVN::Utils';
9 +require_ok 'Git::SVN';