{"thread":{"id":"22902","subject":"[PATCH] git-svn: make git svn --version work again","startedAt":"2010-03-04T10:23:53Z","lastAt":"2010-03-05T11:13:17Z","messageCount":2,"participants":["Michael J Gruber","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"136145","messageId":"fb196463677f8560aa490eaa137990ab2d5d6b86.1267698128.git.git@drmicha.warpmail.net","threadId":"22902","inReplyTo":null,"subject":"[PATCH] git-svn: make git svn --version work again","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-03-04T10:23:53Z","receivedAt":"2010-03-04T10:23:53Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"by requesting SVN::Core which is needed for the svn version.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nIn fact, there are a few more places where seemingly a req_svn() is missing.\nBut the call chains are very confusing. The one seemingly missing in prop_walk()\nwould be covered by the recursive props test which succeeds, so the caller\nmust have requested SVN::Core also. I believe this applies to the other places\nas well (but not to version()).\n\nIs there any harm done by inserting a superfluous req_svn() in these cases for\ngood measure?\n\n git-svn.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex bae7231..1ffb44c 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -351,6 +351,7 @@ information.\n }\n \n sub version {\n+\t::_req_svn();\n \tprint \"git-svn version $VERSION (svn $SVN::Core::VERSION)\\n\";\n \texit 0;\n }\n-- \n1.7.0.1.300.gd855a\n"},{"id":"136200","messageId":"20100305111317.GB14650@dcvr.yhbt.net","threadId":"22902","inReplyTo":"fb196463677f8560aa490eaa137990ab2d5d6b86.1267698128.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] git-svn: make git svn --version work again","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-03-05T11:13:17Z","receivedAt":"2010-03-05T11:13:17Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Michael J Gruber <git@drmicha.warpmail.net> wrote:\n> by requesting SVN::Core which is needed for the svn version.\n> \n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n\nThanks Michael, pushed out to git://git.bogomips.org/git-svn along with the\ncrlf fixes by Erik.\n\n> ---\n> In fact, there are a few more places where seemingly a req_svn() is missing.\n> But the call chains are very confusing. The one seemingly missing in prop_walk()\n> would be covered by the recursive props test which succeeds, so the caller\n> must have requested SVN::Core also. I believe this applies to the other places\n> as well (but not to version()).\n> \n> Is there any harm done by inserting a superfluous req_svn() in these cases for\n> good measure?\n\nThere should be no harm anywhere SVN::* is needed, Perl won't attempt to\nre-require something that's already required.\n\nThe primary benefactor of having an explicit req_svn() function is the\nno-op case of rebase on certain setups:\n\ncommit d32fad2b89c81ca29128722e0e2f5985426e5e7a\nAuthor: josh robb <josh_robb@fastmail.fm>\nDate:   Wed Feb 24 16:13:50 2010 +1300\n\n    git svn: delay importing SVN::Base until it is needed\n    \n    Importing functions from a .dll into Git for Windows' perl is pretty slow,\n    so let's avoid importing if it is not necessary.\n    \n    This seems particularly slow in virtualized enviroments. Before this\n    change (on my machine):\n    \n    $ time perl /libexec/git-core/git-svn rebase\n    Current branch master is up to date.\n    \n    real 2m56.750s\n    user 0m3.129s\n    sys 2m39.232s\n    \n    Afterwards:\n    \n    $ time perl /libexec/git-core/git-svn rebase\n    Current branch master is up to date.\n    \n    real 0m33.407s\n    user 0m1.409s\n    sys 0m23.054s\n    \n    git svn rebase -n goes from 3m7.046s to 0m10.312s.\n    \n    Signed-off-by: Josh Robb <josh_robb@fastmail.fm>\n    Acked-by: Eric Wong <normalperson@yhbt.net>\n\n-- \nEric Wong\n"}]}