git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Extract Git classes from git-svn (10/10) (was Re: Fix git-svn tests for SVN 1.7.5.)

From
Michael G Schwern <schwern@pobox.com>
Date
Jul 17, 2012, 23:17 UTC
Message-ID
<5005F2A2.9040800@pobox.com>
In-Reply-To
<20120717174446.GA14244@burratino>
>From 5152b76800f076ba0bd528664f62d3c67966fa4e Mon Sep 17 00:00:00 2001
From: "Michael G. Schwern" <schwern@pobox.com>
Date: Thu, 12 Jul 2012 17:25:25 -0700
Subject: [PATCH 11/11] Fix Git::SVN::GlobSpec so it works.
Only used in one place in Git::SVN, load it on demand.
That should be all the Git classes out of git-svn.
---
 perl/Git/SVN.pm          | 5 ++++-
 perl/Git/SVN/GlobSpec.pm | 1 +
 perl/Makefile            | 1 +
 t/Git-SVN/00compile.t    | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 02983d6..247ee1d 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -202,11 +202,14 @@ sub read_all_remotes {
 			    . "must start with 'refs/'\n")
 				unless $remote_ref =~ m{^refs/};
 			$local_ref = uri_decode($local_ref);
+
+			require Git::SVN::GlobSpec;
 			my $rs = {
 			    t => $t,
 			    remote => $remote,
 			    path => Git::SVN::GlobSpec->new($local_ref, 1),
-			    ref => Git::SVN::GlobSpec->new($remote_ref, 0) };
+			    ref => Git::SVN::GlobSpec->new($remote_ref, 0)
+			};
 			if (length($rs->{ref}->{right}) != 0) {
 				die "The '*' glob character must be the last ",
 				    "character of '$remote_ref'\n";
diff --git a/perl/Git/SVN/GlobSpec.pm b/perl/Git/SVN/GlobSpec.pm
index 96cfd98..fede3af 100644
--- a/perl/Git/SVN/GlobSpec.pm
+++ b/perl/Git/SVN/GlobSpec.pm
@@ -1,4 +1,5 @@
 package Git::SVN::GlobSpec;
+
 use strict;
 use warnings;

diff --git a/perl/Makefile b/perl/Makefile
index 6c32918..aa4a28b 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -31,6 +31,7 @@ modules += Git/SVN
 modules += Git/SVN/Memoize/YAML
 modules += Git/SVN/Fetcher
 modules += Git/SVN/Editor
+modules += Git/SVN/GlobSpec
 modules += Git/SVN/Log
 modules += Git/SVN/Migration
 modules += Git/SVN/Prompt
diff --git a/t/Git-SVN/00compile.t b/t/Git-SVN/00compile.t
index 5419438..c92fee4 100644
--- a/t/Git-SVN/00compile.t
+++ b/t/Git-SVN/00compile.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;

-use Test::More tests => 6;
+use Test::More tests => 7;

 require_ok 'Git::SVN';
 require_ok 'Git::SVN::Utils';
@@ -11,3 +11,4 @@ require_ok 'Git::SVN::Ra';
 require_ok 'Git::SVN::Log';
 require_ok 'Git::SVN::Migration';
 require_ok 'Git::IndexInfo';
+require_ok 'Git::SVN::GlobSpec';
-- 
1.7.11.1
Previous: Michael G SchwernNext: Ben Walton
Message 20 of 34 in “Fix git-svn tests for SVN 1.7.5.”
  1. Michael G SchwernJul 17, 2012
  2. Jonathan NiederJul 17, 2012
  3. Michael G SchwernJul 17, 2012
  4. Extract Git classes from git-svn (4/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  5. Extract Git classes from git-svn (5/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  6. Find .pm files automatically (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  7. Jonathan NiederJul 18, 2012
  8. Michael G SchwernJul 18, 2012
  9. Jonathan NiederJul 18, 2012
  10. Extract Git classes from git-svn (2/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  11. Jonathan NiederJul 18, 2012
  12. Eric WongJul 18, 2012
  13. Michael G SchwernJul 19, 2012
  14. Extract Git classes from git-svn (3/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  15. Jonathan NiederJul 18, 2012
  16. Extract Git classes from git-svn (6/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  17. Extract Git classes from git-svn (7/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  18. Extract Git classes from git-svn (8/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  19. Extract Git classes from git-svn (9/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  20. Extract Git classes from git-svn (10/10) (was Re: Fix git-svn tests for SVN 1.7.5.)Michael G Schwern, Jul 17, 2012
  21. Ben WaltonJul 21, 2012
  22. Jonathan NiederJul 17, 2012
  23. Junio C HamanoJul 18, 2012
  24. Thiago FarinaJul 19, 2012
  25. Michael G SchwernJul 24, 2012
  26. Jonathan NiederJul 24, 2012
  27. Eric WongJul 25, 2012
  28. Michael G SchwernJul 25, 2012
  29. OT: mail-based interfaces and web-based interfaces (Re: Extract Git classes from git-svn (1/10))Jonathan Nieder, Jul 25, 2012
  30. Michael G SchwernJul 25, 2012
  31. Eric WongJul 25, 2012
  32. Michael G SchwernJul 26, 2012
  33. Jonathan NiederJul 26, 2012
  34. Eric WongJul 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.