git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael G. Schwern" <schwern@pobox.com>
To: git@vger.kernel.org, gitster@pobox.com
Cc: robbat2@gentoo.org, bwalton@artsci.utoronto.ca,
	normalperson@yhbt.net, jrnieder@gmail.com,
	"Michael G. Schwern" <schwern@pobox.com>
Subject: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.
Date: Thu, 26 Jul 2012 16:22:25 -0700	[thread overview]
Message-ID: <1343344945-3717-5-git-send-email-schwern@pobox.com> (raw)
In-Reply-To: <1343344945-3717-1-git-send-email-schwern@pobox.com>

From: "Michael G. Schwern" <schwern@pobox.com>

Also it can compile on its own now, yay!
---
 git-svn.perl          | 4 ----
 perl/Git/SVN.pm       | 9 +++++++--
 t/Git-SVN/00compile.t | 3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 4c77f69..ef10f6f 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -20,10 +20,7 @@ my $cmd_dir_prefix = eval {
 
 my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
 $ENV{GIT_DIR} ||= '.git';
-$Git::SVN::default_repo_id = 'svn';
-$Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
 $Git::SVN::Ra::_log_window_size = 100;
-$Git::SVN::_minimize_url = 'unset';
 
 if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
 	$ENV{SVN_SSH} = $ENV{GIT_SSH};
@@ -114,7 +111,6 @@ my ($_stdin, $_help, $_edit,
 # This is a refactoring artifact so Git::SVN can get at this git-svn switch.
 sub opt_prefix { return $_prefix || '' }
 
-$Git::SVN::_follow_parent = 1;
 $Git::SVN::Fetcher::_placeholder_filename = ".gitignore";
 $_q ||= 0;
 my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index c71c041..2e0d7f0 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -3,9 +3,9 @@ use strict;
 use warnings;
 use Fcntl qw/:DEFAULT :seek/;
 use constant rev_map_fmt => 'NH40';
-use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent
+use vars qw/$_no_metadata
             $_repack $_repack_flags $_use_svm_props $_head
-            $_use_svnsync_props $no_reuse_existing $_minimize_url
+            $_use_svnsync_props $no_reuse_existing
 	    $_use_log_author $_add_author_from $_localtime/;
 use Carp qw/croak/;
 use File::Path qw/mkpath/;
@@ -30,6 +30,11 @@ BEGIN {
 	$can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
 }
 
+our $_follow_parent  = 1;
+our $_minimize_url   = 'unset';
+our $default_repo_id = 'svn';
+our $default_ref_id  = $ENV{GIT_SVN_ID} || 'git-svn';
+
 my ($_gc_nr, $_gc_period);
 
 # properties that we do not log:
diff --git a/t/Git-SVN/00compile.t b/t/Git-SVN/00compile.t
index a7aa85a..97475d9 100644
--- a/t/Git-SVN/00compile.t
+++ b/t/Git-SVN/00compile.t
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 require_ok 'Git::SVN::Utils';
+require_ok 'Git::SVN';
-- 
1.7.11.1

  parent reply	other threads:[~2012-07-26 23:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 23:22 Extract Git::SVN from git-svn, take 2 Michael G. Schwern
2012-07-26 23:22 ` [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN Michael G. Schwern
2012-07-27  5:18   ` Junio C Hamano
2012-07-27  8:19     ` Michael G Schwern
2012-07-27 11:34     ` Eric Wong
2012-07-26 23:22 ` [PATCH 2/4] Prepare Git::SVN for extraction into its own file Michael G. Schwern
2012-07-27  5:18   ` Junio C Hamano
2012-07-27  5:23     ` Junio C Hamano
2012-07-27  8:16     ` Michael G Schwern
2012-07-27 11:53       ` Eric Wong
2012-07-26 23:22 ` Michael G. Schwern [this message]
2012-07-27  5:18   ` [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN Junio C Hamano
2012-07-27  5:38     ` Jonathan Nieder
2012-07-27  6:07       ` Junio C Hamano
2012-07-27  6:46         ` Junio C Hamano
2012-07-27  7:09           ` Junio C Hamano
2012-07-27 20:07             ` Eric Wong
2012-07-27 20:56               ` Michael G Schwern
2012-07-27 20:59                 ` Eric Wong
2012-07-27 21:31                 ` Junio C Hamano
2012-07-27 21:49               ` Junio C Hamano
2012-07-27 22:07                 ` Eric Wong
2012-07-27 22:19                   ` Eric Wong
2012-07-27 22:37                     ` Junio C Hamano
2012-07-27 22:45                       ` Eric Wong
2012-07-27 22:59                         ` Junio C Hamano
2012-07-27 23:01                           ` Eric Wong
2012-07-27 22:52                     ` Junio C Hamano
2012-07-27 11:59         ` Eric Wong
2012-07-27  8:41     ` Michael G Schwern
  -- strict thread matches above, loose matches on Subject: below --
2012-07-25  6:01 Move Git::SVN into its own .pm file Michael G. Schwern
2012-07-25  6:01 ` [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN Michael G. Schwern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343344945-3717-5-git-send-email-schwern@pobox.com \
    --to=schwern@pobox.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=robbat2@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).