Re: [PATCH 6/7] Switch path canonicalization to use the SVN API.

2012-08-02 Thread Michael G Schwern
On 2012.8.2 2:51 PM, Eric Wong wrote: > svn_path_canonicalize() may be accessible in some versions of SVN, > but it'll return undef. Yuck! Good catch! > I've tested the following on an old CentOS 5.2 chroot with SVN 1.4.2: Looks good to me. -- Alligator sandwich, and make it snappy! -- To u

Re: Fix git-svn for SVN 1.7

2012-07-31 Thread Michael G Schwern
On 2012.7.31 4:05 PM, Junio C Hamano wrote: > What I won't accept is "maintainability does not matter". It does. I'm sorry, that's not what I intended to convey at all. My reply to Eric lays it out more clearly, I think. -- Reality is that which, when you stop believing in it, doesn't go away

Re: Fix git-svn for SVN 1.7

2012-07-31 Thread Michael G Schwern
On 2012.7.31 1:01 PM, Eric Wong wrote: > Michael G Schwern wrote: >> It just doesn't matter. >> >> Why are we arguing over which solution will be 4% better two years from now, >> or if my commits are formatted perfectly, when tremendous amounts of basic >> w

Re: Fix git-svn for SVN 1.7

2012-07-31 Thread Michael G Schwern
It just doesn't matter. Why are we arguing over which solution will be 4% better two years from now, or if my commits are formatted perfectly, when tremendous amounts of basic work to be done improving git-svn? The code is undocumented, lacking unit tests, difficult to understand and riddled with

Re: Fix git-svn for SVN 1.7

2012-07-30 Thread Michael G Schwern
On 2012.7.30 7:18 PM, Eric Wong wrote: > Michael G Schwern wrote: >> On 2012.7.30 3:15 PM, Eric Wong wrote: >>>> Right now, canonicalization is a bug generator. Paths and URLs have to be >>>> in >>>> the same form when they're compared. Thi

Re: Fix git-svn for SVN 1.7

2012-07-30 Thread Michael G Schwern
On 2012.7.30 3:15 PM, Eric Wong wrote: >> Right now, canonicalization is a bug generator. Paths and URLs have to be in >> the same form when they're compared. This requires meticulous care on the >> part of the coder and reviewer to check every comparison. It scatters the >> logic for proper com

Re: Fix git-svn for SVN 1.7

2012-07-30 Thread Michael G Schwern
On 2012.7.30 1:38 PM, Eric Wong wrote: >> A better solution would be to have path and URL objects which overload >> the eq operator and automatically stringify canonicalized and escaped. > > Perhaps we can depend on the URI.pm module? It seems to be > widely-available and not be a significant bar

Re: [PATCH 3/7] Extract, test and enhance the logic to collapse ../foo paths.

2012-07-30 Thread Michael G Schwern
On 2012.7.30 12:51 PM, Eric Wong wrote: >> The SVN API functions will not accept ../foo but their canonicalization >> functions will not collapse it. So we'll have to do it ourselves. >> >> _collapse_dotdot() works better than the existing regex did. > > I don't dispute it's better, but it's wort

Re: [PATCH 2/7] Change canonicalize_url() to use the SVN 1.7 API when available.

2012-07-28 Thread Michael G Schwern
On 2012.7.28 1:02 PM, Jonathan Nieder wrote: > Jonathan Nieder wrote: >> Michael G Schwern wrote: > >>> I would suggest that worrying whether a few lines of code are introduced now >>> or 10 patches later in the same branch which is all going to be merged in >

Re: [PATCH 2/7] Change canonicalize_url() to use the SVN 1.7 API when available.

2012-07-28 Thread Michael G Schwern
On 2012.7.28 12:30 PM, Jonathan Nieder wrote: >> I didn't know about that. I don't know what your SVN backwards compat >> requirements are, but if that behavior goes back far enough in SVN to satisfy >> you folks, then canonicalize_url() should fall back to >> SVN::_Core::svn_path_canonicalize().

Re: [PATCH 1/8] SVN 1.7 will truncate "not-a%40{0}" to just "not-a".

2012-07-28 Thread Michael G Schwern
On 2012.7.28 7:16 AM, Jonathan Nieder wrote: > Michael G. Schwern wrote: > >> Rather than guess what SVN is going to do for each version, make the test use >> the branch name that was actually created. > [...] >> -git rev-parse "refs/remotes/not-a%40{0

Re: [PATCH 7/7] Make Git::SVN and Git::SVN::Ra canonicalize paths and urls.

2012-07-28 Thread Michael G Schwern
On 2012.7.28 7:11 AM, Jonathan Nieder wrote: > Yay! Am I correct in imagining this makes the following sequence of > commands[1] no longer trip an assertion failure in svn_path_join[2] > with SVN 1.6? > > git svn init -Thttp://trac-hacks.org/svn/tagsplugin/trunk \ > -thttp://t

Re: [PATCH 6/7] Switch path canonicalization to use the SVN API.

2012-07-28 Thread Michael G Schwern
On 2012.7.28 6:55 AM, Jonathan Nieder wrote: > Michael G. Schwern wrote: >> --- a/perl/Git/SVN/Utils.pm >> +++ b/perl/Git/SVN/Utils.pm >> @@ -86,6 +86,27 @@ sub _collapse_dotdot { >> >> >> sub canonicalize_path { >> +my $path = shift; &

Re: [PATCH 2/7] Change canonicalize_url() to use the SVN 1.7 API when available.

2012-07-28 Thread Michael G Schwern
On 2012.7.28 6:50 AM, Jonathan Nieder wrote: >> --- a/perl/Git/SVN/Utils.pm >> +++ b/perl/Git/SVN/Utils.pm > [...] >> @@ -100,6 +102,20 @@ API as a URL. >> =cut >> >> sub canonicalize_url { >> +my $url = shift; >> + >> +# The 1.7 way to do it >> +if ( defined &SVN::_Core::svn_uri_ca

[PATCH 5/8] Canonicalize earlier in a couple spots.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Just a few things I noticed. Its good to canonicalize as early as possible. --- git-svn.perl | 6 +++--- perl/Git/SVN/Ra.pm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 6e97545..6b90765 10

[PATCH 3/8] Improve our URL canonicalization to be more like SVN 1.7's.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Previously, our URL canonicalization didn't do much of anything. Now it actually escapes and collapses slashes. This is mostly a cut & paste of escape_url from git-svn. This is closer to how SVN 1.7's canonicalization behaves. Doing it wit

[PATCH 7/8] Turn on canonicalization on newly minted URLs.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Go through all the spots that use the new add_path_to_url() to make a new URL and canonicalize them. * copyfrom_path has to be canonicalized else find_parent_branch will get confused * due to the `canonicalize_url($full_url) ne $full_url)` line of

[PATCH 6/8] Add function to append a path to a URL.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Remove the ad-hoc versions. This is mostly to normalize the process and ensure the URLs produced don't have double slashes or anything. Also provides a place to fix the corner case where a file path contains a percent sign. --- git-svn.perl

[PATCH 8/8] Remove some ad hoc canonicalizations.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" --- git-svn.perl| 8 perl/Git/SVN.pm | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 3d120d5..56d1ba7 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -36,6 +36,7 @@ use Git::SVN

[PATCH 1/8] SVN 1.7 will truncate "not-a%40{0}" to just "not-a".

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Rather than guess what SVN is going to do for each version, make the test use the branch name that was actually created. --- t/t9118-git-svn-funky-branch-names.sh | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/t9118-git-svn-fu

[PATCH 4/8] Replace hand rolled URL escapes with canonicalization

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Continuing to move towards getting everything canonicalizing the same way. * Git::SVN->init_remote_config and Git::SVN::Ra->minimize_url both have to canonicalize the same way else init_remote_config will incorrectly think they're different

[PATCH 2/8] Fix typo in test

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Test to check that the migration got rid of the old style git-svn directory. It wasn't failing, just throwing a message to STDERR. --- t/t9107-git-svn-migrate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9107-git-svn-migra

Fix git-svn for SVN 1.7

2012-07-28 Thread Michael G. Schwern
This patch series fixes git-svn for SVN 1.7 tested against SVN 1.7.5 and 1.6.18. Patch 7/8 is where SVN 1.7 starts passing. There is one exception. t9100-git-svn-basic.sh fails 11-13. This appears to be due to a bug in SVN to do with symlinks. Leave that for somebody else, this is the final su

[PATCH 7/7] Make Git::SVN and Git::SVN::Ra canonicalize paths and urls.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" This canonicalizes paths and urls as early as possible so we don't have to remember to do it at the point of use. It will fix a swath of SVN 1.7 problems in one go. Its ok to double canonicalize things. SVN 1.7 still fails, still not worrying about

[PATCH 6/7] Switch path canonicalization to use the SVN API.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" All tests pass with SVN 1.6. SVN 1.7 remains broken, not worrying about it yet. SVN changed its path canonicalization API between 1.6 and 1.7. http://svnbook.red-bean.com/en/1.6/svn.developer.usingapi.html#svn.developer.usingapi.urlpath http://svnbook.red-b

[PATCH 5/7] Remove irrelevant comment.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" The code doesn't use File::Spec. --- perl/Git/SVN/Utils.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/perl/Git/SVN/Utils.pm b/perl/Git/SVN/Utils.pm index deade07..6c8ae53 100644 --- a/perl/Git/SVN/Utils.pm +++ b/perl/Git/SVN/Utils.pm @@ -92

[PATCH 4/7] Add join_paths() to safely concatenate paths.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" Otherwise you might wind up with things like... my $path1 = undef; my $path2 = 'foo'; my $path = $path1 . '/' . $path2; creating '/foo'. Or this... my $path1 = 'foo/'; my $path2 = 'bar'

[PATCH 2/7] Change canonicalize_url() to use the SVN 1.7 API when available.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" No change on SVN 1.6. The tests all pass with SVN 1.6 if canonicalize_url() does nothing, so tests passing doesn't have much meaning. The tests are so messed up right now with SVN 1.7 it isn't really useful to check. They will be useful late

[PATCH 3/7] Extract, test and enhance the logic to collapse ../foo paths.

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" The SVN API functions will not accept ../foo but their canonicalization functions will not collapse it. So we'll have to do it ourselves. _collapse_dotdot() works better than the existing regex did. This will be used shortly when canonicalize_path() s

[PATCH 1/7] Move the canonicalization functions to Git::SVN::Utils

2012-07-28 Thread Michael G. Schwern
From: "Michael G. Schwern" So they can be used by others. I'd like to test them, but they're going to become SVN API wrappers shortly and those aren't predictable. No functional change. --- git-svn.perl | 33 +++- p

Canonicalize the git-svn path & url accessors

2012-07-28 Thread Michael G. Schwern
This patch turns on canonicalization in the Git::SVN and Git::SVN::Ra path and url accessors. It also makes the canonicalizers use the SVN API when available. All patches pass with SVN 1.6. Next patch series will fix SVN 1.7. This should be placed on top of the previous patch series which added

Re: Make git-svn Use accessors for paths and urls

2012-07-28 Thread Michael G Schwern
On 2012.7.27 8:10 PM, Jonathan Nieder wrote: >> This is the last refactoring patch series. After this bugs, start >> getting fixed. > > I just wanted to say thanks for your thoughtful presentation of this > code. I was worried before, but these have been pleasantly submitted. You're welcome. I

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-27 Thread Michael G Schwern
On 2012.7.27 1:07 PM, Eric Wong wrote: > While Makefile.PL now finds .pm files on its own, it does not > detect new files after it generates perl/perl.mak. Are you saying this doesn't work? perl Makefile.PL make -f perl.mak touch Git/Foo.pm perl Makefile.PL make -f perl.mak or this? perl Makefi

[PATCH 5/5] Change the rest of the code to use the Git::SVN and Git::SVN::Ra url accessors.

2012-07-27 Thread Michael G. Schwern
From: "Michael G. Schwern" Note: The structure returned from Git::SVN->read_all_remotes() does not appear to contain objects, so I'm leaving them alone. That's everything converted over to the url and path accessors. No functional change. --- git-svn.perl

[PATCH 4/5] Change the rest of the code to use Git::SVN->path instead of the hash directly.

2012-07-27 Thread Michael G. Schwern
From: "Michael G. Schwern" No functional change. --- git-svn.perl| 12 +++- perl/Git/SVN.pm | 4 ++-- perl/Git/SVN/Fetcher.pm | 2 +- perl/Git/SVN/Ra.pm | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/git-svn.perl b/gi

[PATCH 3/5] Make Git::SVN::Ra use an accessor for URLs

2012-07-27 Thread Michael G. Schwern
From: "Michael G. Schwern" Later it can canonicalize automatically. A later change will make other things use the accessor. No functional change. --- perl/Git/SVN/Ra.pm | 40 +--- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pe

[PATCH 2/5] Make Git::SVN use an accessor for URLs internally.

2012-07-27 Thread Michael G. Schwern
From: "Michael G. Schwern" So later it can do automatic canonicalization. A later patch will make other things use the accessor. No functional change here. --- perl/Git/SVN.pm | 44 ++-- 1 file changed, 30 insertions(+), 14 deletions(-) di

[PATCH 1/5] Make Git::SVN use accessors internally for path.

2012-07-27 Thread Michael G. Schwern
From: "Michael G. Schwern" Then later it can be canonicalized automatically rather than everywhere its used. Later patch will make other things use it. --- perl/Git/SVN.pm | 87 + 1 file changed, 56 insertions(+), 31 deletion

Make git-svn Use accessors for paths and urls

2012-07-27 Thread Michael G. Schwern
This patch series gives Git::SVN and Git::SVN::Ra accessors for path and url and then makes the rest of the code use them, rather than grab at $obj->{path} and $obj->{url}. This then will give us the control necessary to canonicalize them as early as possible (done in the next patch series). Ther

Re: Extract remaining classes from git-svn

2012-07-27 Thread Michael G Schwern
On 2012.7.27 4:29 AM, Erik Faye-Lund wrote: > On Fri, Jul 27, 2012 at 2:27 AM, Michael G Schwern wrote: >> On 2012.7.26 5:25 PM, Michael G. Schwern wrote: >>> This series of patches extracts the remaining classes from git-svn. They're >>> all simple extractions

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-27 Thread Michael G Schwern
On 2012.7.26 10:18 PM, Junio C Hamano wrote: > If you swap the order of steps 3/4 and 4/4 by creating Git/SVN.pm > that only has these variable definitions (i.e. "our $X" and "use > vars $X") and make git-svn.perl use them from Git::SVN in the first > step, and then do the bulk-moving (equivalent o

Re: [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-27 Thread Michael G Schwern
On 2012.7.26 10:18 PM, Junio C Hamano wrote: >> +# Note: not certain why this is in use instead of die. Probably because >> +# the exit code of die is 255? Doesn't appear to be used consistently. >> +sub fatal (@) { print STDERR "@_\n"; exit 1 } > > Very true. Also I do not think the line-noise

Re: [PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-27 Thread Michael G Schwern
On 2012.7.26 10:18 PM, Junio C Hamano wrote: > Forgot to sign-off, or are you still unsure about this step? I just never think to do it. It's just a line in the commit message, right? There's no crypto involved like tag -s. Is it a blocker? I guess I can write a msg-filter if it's important.

Re: Extract remaining classes from git-svn

2012-07-26 Thread Michael G Schwern
On 2012.7.26 5:25 PM, Michael G. Schwern wrote: > This series of patches extracts the remaining classes from git-svn. They're > all simple extractions and functionally have no change. PS This is on top of the previous Git::SVN extraction patch series. -- 100. Claymore mines are

[PATCH 5/8] Load all the modules in one place and before running code.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Just makes the code easier to follow. No functional change. Also eliminate an unused lexical $SVN. --- git-svn.perl | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/git-svn.perl b/git-svn.

[PATCH 4/8] Extract Git::SVN::Migration from git-svn.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Straight cut & paste. --- git-svn.perl | 258 +- perl/Git/SVN/Migration.pm | 258 ++ perl/Makefile | 1 + t/Git-SVN/00compile.t |

[PATCH 6/8] Move Git::IndexInfo into its own file.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Straight cut & paste. Didn't require any fixing. --- git-svn.perl| 32 perl/Git/IndexInfo.pm | 33 + perl/Git/SVN/Fetcher.pm | 1 + perl/Makefile | 1 + t/

[PATCH 7/8] Extract Git::SVN::GlobSpec from git-svn.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Straight cut & paste. That's the last class. * Make Git::SVN load it on its own, its the only thing that needs it. --- git-svn.perl | 59 perl/Git/SVN.pm | 2 ++ perl/Git/S

[PATCH 8/8] Fix indents to match style.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" --- git-svn.perl | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 584e93a..4d173d4 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -31,14 +31,14 @@ use Git::SVN::Migration; use Git::SVN

[PATCH 3/8] Prepare Git::SVN::Migration for extraction from git-svn.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" * Load Git command functions on its own. * Load Git::SVN modules on its own. Drive by refactorings... * Use our() instead of use vars. * Eliminate the auto loading of Git functions. --- git-svn.perl | 36 1 file c

[PATCH 2/8] Extract Git::SVN::Log from git-svn.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Straight cut & paste. Also noticed Git::SVN::Ra wasn't in the compile test. It is now. --- git-svn.perl | 395 +- perl/Git/SVN/Log.pm | 395 ++

[PATCH 1/8] Prepare Git::SVN::Log for extraction from git-svn.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" * Load Git command functions itself. * Can't access the git-svn switch lexical any more, but its only used by Git::SVN::Log so turn it into a Git::SVN::Log global. * Load Git::SVN as needed. No need to load it always, its only used twice. * Moved a

Extract remaining classes from git-svn

2012-07-26 Thread Michael G. Schwern
This series of patches extracts the remaining classes from git-svn. They're all simple extractions and functionally have no change. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

[PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a git-svn lexical $_prefix representing the --prefix option. Provide opt_prefix() for that.

[PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" 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..ef10

[PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-26 Thread Michael G. Schwern
From: "Michael G. Schwern" Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be documented and tested. * fatal() is used by many classes. *

Extract Git::SVN from git-svn, take 2.

2012-07-26 Thread Michael G. Schwern
Same as before, now with tab indentation in the new Perl tests. As before, patch #3 is 132k and will be rejected by some of the lists. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel

Re: OT: mail-based interfaces and web-based interfaces (Re: Extract

2012-07-25 Thread Michael G Schwern
On 2012.7.25 4:48 PM, Eric Wong wrote: > We need to use something. Right now our choice of mailer is the best > choice for _existing_ contributors. I believe this entire discussion can be reduced to that right there. If your process is optimized for existing contributors, it will work well for e

Re: [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-25 Thread Michael G Schwern
This is rapidly getting into the weeds. Regardless of the debate below, what would you like me to do? Switch indentation to tabs and resubmit? AFAIK only the new tests are affected. On 2012.7.25 4:08 PM, Eric Wong wrote: +BEGIN { +# Override exit at BEGIN time before Git::SVN::Ut

Re: Teach Makefile.PL to find .pm files on its own

2012-07-25 Thread Michael G Schwern
On 2012.7.25 3:19 PM, Junio C Hamano wrote: > Michael G Schwern writes: >> How about the git-svn SVN 1.7 fix in general? All of these patch sets I'm >> sending build on one another, is that going to be a problem? It's going to >> come in about six parts. &g

Re: [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-25 Thread Michael G Schwern
On 2012.7.25 2:24 PM, Eric Wong wrote: > Please keep Jonathan Cc:-ed, he's been very helpful with this series > (and very helpful in general :) I will try. >> +use Test::More 'no_plan'; > > Didn't we agree to use done_testing()? Perhaps (as you suggested) with > a private copy of Test::More?

Re: Move Git::SVN into its own .pm file

2012-07-25 Thread Michael G Schwern
On 2012.7.25 2:15 PM, Jonathan Nieder wrote: > Michael G. Schwern wrote: >> This is a refactoring to move Git::SVN out of git-svn and into its own .pm >> file. >> This will make it easier to work with and test. This is just the extraction >> with minimal wor

Re: [PATCH 3/3] The Makefile.PL will now find .pm files itself.

2012-07-25 Thread Michael G Schwern
On 2012.7.25 2:11 PM, Jonathan Nieder wrote: >> --- a/perl/Makefile.PL >> +++ b/perl/Makefile.PL >> @@ -2,6 +2,10 @@ use strict; >> use warnings; >> use ExtUtils::MakeMaker; >> use Getopt::Long; >> +use File::Find; >> + >> +# Don't forget to update the perl/Makefile, too. >> +# Don't forget to t

Re: Teach Makefile.PL to find .pm files on its own

2012-07-25 Thread Michael G Schwern
On 2012.7.25 1:32 PM, Junio C Hamano wrote: > Michael G Schwern writes: > >> What's the lag time on it showing up in the repo, and which branch will it >> appear in? > > There is nothing special in this topic, so it is likely to start on > 'pu', and

Re: Teach Makefile.PL to find .pm files on its own

2012-07-25 Thread Michael G Schwern
On 2012.7.25 9:56 AM, Junio C Hamano wrote: > Looks sensible. Will queue. > > Thanks. Thanks! What's the lag time on it showing up in the repo, and which branch will it appear in? Also I just realized I've been basing my work on master. Should I move to maint? -- If you want the truth to

Re: git-svn SVN 1.7 fix, take 2

2012-07-25 Thread Michael G Schwern
On 2012.7.25 12:14 AM, Junio C Hamano wrote: >> Nothing, because paths are not URI escaped. :) >> >> You probably meant svn_uri_canonicalize(). And no, it does not double >> escape, >> so its safe to escape as early as possible. > > Are you saying that the function assumes that a local pathname

Re: OT: mail-based interfaces and web-based interfaces (Re: Extract Git classes from git-svn (1/10))

2012-07-24 Thread Michael G Schwern
On 2012.7.24 10:54 PM, Jonathan Nieder wrote: >> And again, it *does not have to be zero sum*. It doesn't have to be email VS >> GUI. You can have your cake and eat it too. > > I assume you're talking about web-based interfaces that have gateways > to email, that produce inboxes like this: > >

[PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" 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..ef10

[PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a git-svn lexical $_prefix representing the --prefix option. Provide opt_prefix() for that.

[PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be documented and tested. * fatal() is used by many classes. *

Move Git::SVN into its own .pm file

2012-07-24 Thread Michael G. Schwern
This is a refactoring to move Git::SVN out of git-svn and into its own .pm file. This will make it easier to work with and test. This is just the extraction with minimal work to keep all tests passing. A couple of utility functions which were used by Git::SVN, git-svn and others were also extract

Re: Extract Git classes from git-svn (1/10)

2012-07-24 Thread Michael G Schwern
On 2012.7.24 7:55 PM, Eric Wong wrote: >> After I'm exhausted from volunteering all the coding work, rather than >> submitting a URL to a remote repository I find I have to learn new >> specialized >> tools. It's extra learning and work, an extra step to screw up, and foreign >> to me (even as a

Re: git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
On 2012.7.24 9:53 PM, Jonathan Nieder wrote: > Michael G Schwern wrote: > >> No, now it's just canonicalizing as early as possible. Preferably within the >> object accessor rather than at the point of use. So in the code below, >> $full_url is already escaped/ca

[PATCH 3/3] The Makefile.PL will now find .pm files itself.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" It is no longer necessary to manually add new .pm files to the Makefile.PL. This makes it easier to add modules. It is still necessary to add them to the Makefile, but that extra work should be removed at a future date. Signed-off-by: Michael G Schwern

[PATCH 2/3] Don't lose Error.pm if $@ gets clobbered.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" In older Perls, sometimes $@ can become unset between the eval and checking $@. Its safer to check the eval directly. Signed-off-by: Michael G Schwern --- perl/Makefile.PL | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/perl/Makefile

[PATCH 1/3] Quiet warning if Makefile.PL is run with -w and no --localedir

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" Usually it isn't, but its nice if it can be run with warnings on. Signed-off-by: Michael G Schwern --- perl/Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl/Makefile.PL b/perl/Makefile.PL index b54b04a..87e1f62 10

Teach Makefile.PL to find .pm files on its own

2012-07-24 Thread Michael G. Schwern
This makes it so you no longer must edit the Makefile.PL every time you add, rename or delete a Perl module. This is convenient, and I'm about to extract a bunch of .pm files out of git-svn. You still have to edit the Makefile. That parallel build system should be able to be removed at a later da

Re: git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
On 2012.7.24 4:45 PM, Junio C Hamano wrote: >>> git log -p schwern/git-svn/extract-classes..schwern/git-svn/fix-canonical >>> >>> That should give you the information you need... >> >> I guess so. May we have your sign-off on these changes? (A simple >> reply of "yes" is enough, no need to rese

Re: git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
On 2012.7.24 2:51 PM, Junio C Hamano wrote: > Michael G Schwern writes: > >> A big one is "do not blast 10 emails to a mailing list" but I gather that's >> ok >> here if a submission needs 10 commits to be well expressed and its done via >> git-sen

Re: git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
On 2012.7.24 3:02 PM, Jonathan Nieder wrote: >> The Git::SVN extraction is more complicated than the rest, so I'll probably >> do >> that separately and bust it up into a few commits. > > All of these changes are supposed to have zero functional effect, > right? Right. They're just class extrac

Re: Extract Git classes from git-svn (1/10)

2012-07-24 Thread Michael G Schwern
On 2012.7.17 10:49 PM, Junio C Hamano wrote: > By allowing people to easily publish a completed work, and making it > easier for them to let others peek at their work, Git hosting > services like GitHub are wonderful. But I am not conviced that > quality code reviews like we do on the mailing list

git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
It's post OSCON so I can take another crack at this again. I'm struggling with how best to present all this to you folks. There's etiquette for how one presents a git pull request... but there's conflicting etiquette about how one presents patches to a mailing list. I'm not sure which bit of whi

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

2012-07-18 Thread Michael G Schwern
On 2012.7.18 3:58 AM, Eric Wong wrote: > I agree with everything Jonathan said (and thank him for taking > the time to point you in the right direction). Thanks, you guys have been very nice to my flailing and failing. I'm going to back off and send out a sort of overview email so we can figure o

Re: Find .pm files automatically (was Re: Fix git-svn tests for SVN 1.7.5.)

2012-07-17 Thread Michael G Schwern
On 2012.7.17 5:01 PM, Jonathan Nieder wrote: >> It also moves Error.pm into a bundle directory. This both makes it just >> another directory to scan (or not scan), but it also makes it possible to >> bundle additional modules in the future. ExtUtils::MakeMaker uses this >> technique itself. > >

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

2012-07-17 Thread Michael G Schwern
>From 5152b76800f076ba0bd528664f62d3c67966fa4e Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" 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 c

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

2012-07-17 Thread Michael G Schwern
>From 368d6c7883080d85f82b1eae1815834e3d59ef5e Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 17 Jul 2012 15:54:33 -0700 Subject: [PATCH 10/11] Cut & paste Git::SVN::GlobSpec into its own file. Fixes to make it work come next commit. --- git-svn.perl

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

2012-07-17 Thread Michael G Schwern
>From 4fd7b8574b32753dcf22ec0a592f13586b938689 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 12 Jul 2012 17:20:02 -0700 Subject: [PATCH 09/11] Fix Git::IndexInfo so it compiles. Only used by Git::SVN::Fetcher. --- perl/Git/IndexInfo.pm | 2 ++ perl/Git/SVN/F

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

2012-07-17 Thread Michael G Schwern
>From 9ff49d9e91c9741d501620ac47f78d8ff8ef9983 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 17 Jul 2012 15:51:53 -0700 Subject: [PATCH 08/11] Cut & paste Git::IndexInfo into its own file. No other changes, those are next commit so they can be seen in the diff.

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

2012-07-17 Thread Michael G Schwern
>From cb1a73929da15e87fa3dcc41c4cfa9ca592081fa Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 12 Jul 2012 17:14:24 -0700 Subject: [PATCH 07/11] Fix Git::SVN::Migration after its move. Also... * eliminate the big "import all the Git command functions" loop,

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

2012-07-17 Thread Michael G Schwern
>From ab67ab421dbfd248b9a198b8cc1cd9944ba6178d Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 17 Jul 2012 15:46:44 -0700 Subject: [PATCH 06/11] Move Git::SVN::Migration into its own file. Just a straight cut & paste, the fixes come next commit.

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

2012-07-17 Thread Michael G Schwern
>From 8f70be0424a770c299b6a0c5bf99e4030e5e4d92 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 12 Jul 2012 16:58:53 -0700 Subject: [PATCH 05/11] Make Git::SVN::Log work. Changes to Git::SVN::Log to make it compile * Change the $_git_format lexical only used by

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

2012-07-17 Thread Michael G Schwern
>From 5f0b609e9b0a70c86c46b48f0b180c96c3355a14 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 17 Jul 2012 15:40:03 -0700 Subject: [PATCH 04/11] Extract Git::SVN::Log from git-svn. This is a straight cut & paste. Next commit will make it work. This will make it

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

2012-07-17 Thread Michael G Schwern
>From 683a230e439f1d5ac2727ce4c2a74e93804fc72b Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Wed, 11 Jul 2012 22:16:01 -0700 Subject: [PATCH 03/11] Fix Git::SVN so it can at least compile alone. It's still very intertwined with git-svn, but that's a lot of

Find .pm files automatically (was Re: Fix git-svn tests for SVN 1.7.5.)

2012-07-17 Thread Michael G Schwern
technique itself. You still have to remember to add them to the other Makefile. This is available as a branch. https://github.com/schwern/git/tree/git-svn/easier_modules >From 47a723a860cded6b16a716ea74c5bc029ee5b0ac Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 1

Re: Fix git-svn tests for SVN 1.7.5.

2012-07-17 Thread Michael G Schwern
On 2012.7.17 10:44 AM, Jonathan Nieder wrote: > Michael G Schwern wrote: >> I've fixed the git-svn tests for SVN 1.7 and tested with SVN 1.7.5. > > Thanks. git-svn is not maintained by Junio but by Eric and others on > the list. I'm cc-ing Eric and Ben Walton so

Fix git-svn tests for SVN 1.7.5.

2012-07-16 Thread Michael G Schwern
Hi, I've fixed the git-svn tests for SVN 1.7 and tested with SVN 1.7.5. SVN 1.7 changed its expectations of path and URL formats and git-svn did not comply with them. The new code uses SVN's own canonicalization routines where available. This has been reported in several places... https://bugs.