{"thread":{"id":"29658","subject":"git-svn won't remember pem password","startedAt":"2012-02-18T00:36:11Z","lastAt":"2013-08-29T17:56:05Z","messageCount":35,"participants":["Igor","Jakub Narebski","Eric Wong","Nikolaus Demmel","Jeff King","Matthijs Kooijman","Junio C Hamano","Charles Bailey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"184914","messageId":"E56535F6-2C9B-4D14-A88F-2471E34D2769@gmail.com","threadId":"29658","inReplyTo":null,"subject":"git-svn won't remember pem password","fromName":"Igor","fromEmail":"mrigor83@gmail.com","sentAt":"2012-02-18T00:36:11Z","receivedAt":"2012-02-18T00:36:11Z","isPatch":false,"sender":{"key":"mrigor83@gmail.com","avatar":null},"body":"I'm running into an issue where I have to enter my pem certificate password every time I git-svn fetch or git-svn dcommit. Vanilla svn uses OS X KeyChain and remembers my password just fine. Is there a known solution for this? Other users have ran into same issue as described here: http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords. However, that solution of removing .subversion folder did not work for me.\n\nThanks,\nIgor"},{"id":"184928","messageId":"m3zkcgqt0g.fsf@localhost.localdomain","threadId":"29658","inReplyTo":"E56535F6-2C9B-4D14-A88F-2471E34D2769@gmail.com","subject":"Re: git-svn won't remember pem password","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2012-02-18T11:30:00Z","receivedAt":"2012-02-18T11:30:00Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Igor <mrigor83@gmail.com> writes:\n\n> I'm running into an issue where I have to enter my pem certificate\n> password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n> uses OS X KeyChain and remembers my password just fine. Is there a\n> known solution for this? Other users have ran into same issue as\n> described here:\n>\n>   http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords\n\n> However, that solution of removing .subversion folder did not work\n> for me.\n\nI don't know if it is svn that has to remember password, or git that\nhas to remember password.  Git 1.7.9 learned \"credentials API\" that\nallows integration with platform native keychain mechanisms, and I\nthink OS X Keychain is one of examples / supported platforms (but it\nmight not made it into core git)... though I am not sure if it affects\ngit-svn, or only HTTP(S) transport.\n\n-- \nJakub Narebski\n"},{"id":"184937","messageId":"20120219013011.GB31886@dcvr.yhbt.net","threadId":"29658","inReplyTo":"E56535F6-2C9B-4D14-A88F-2471E34D2769@gmail.com","subject":"Re: git-svn won't remember pem password","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-02-19T01:30:11Z","receivedAt":"2012-02-19T01:30:11Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Igor <mrigor83@gmail.com> wrote:\n> I'm running into an issue where I have to enter my pem certificate\n> password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n> uses OS X KeyChain and remembers my password just fine. Is there a\n> known solution for this? Other users have ran into same issue as\n> described here:\n> http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords.\n> However, that solution of removing .subversion folder did not work for\n> me.\n\nHi Igor, this issue seems related to the platform specific auth\nproviders patches.   There have been bugs in the SVN bindings in\nprevious releases and uncertainty about how everything works.\n\nI haven't been interested enough to follow along closely[1], but maybe\nsome other folks Cc:-ed can finally push this through.\n\nhttp://mid.gmane.org/20120103204403.GI17548@login.drsnuggles.stderr.nl\n\nBasically I'm waiting for a patch that we can be certain won't break the\nmajority of existing use cases (especially no triggering of segfaults\nand other nastiness in released versions of SVN bindings).\n\n[1] - I barely use git-svn anymore, and wouldn't touch GNOME or OSX\n      with a 10-foot pole...\n"},{"id":"184938","messageId":"1329624193999-7298035.post@n2.nabble.com","threadId":"29658","inReplyTo":"m3zkcgqt0g.fsf@localhost.localdomain","subject":"Re: git-svn won't remember pem password","fromName":"Nikolaus Demmel","fromEmail":"nikolaus@nikolaus-demmel.de","sentAt":"2012-02-19T04:03:14Z","receivedAt":"2012-02-19T04:03:14Z","isPatch":false,"sender":{"key":"nikolaus@nikolaus-demmel.de","avatar":"https://gravatar.com/avatar/2c9741b87d0f456387a06f577a904933d4614758202292a48ca1c739ebb48916?d=mp&s=160"},"body":"\nJakub Narebski wrote\n> \n> Igor &lt;mrigor83@&gt; writes:\n> \n>> I'm running into an issue where I have to enter my pem certificate\n>> password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n>> uses OS X KeyChain and remembers my password just fine. Is there a\n>> known solution for this?\n> \n> I don't know if it is svn that has to remember password, or git that\n> has to remember password.  Git 1.7.9 learned \"credentials API\" that\n> allows integration with platform native keychain mechanisms, and I\n> think OS X Keychain is one of examples / supported platforms (but it\n> might not made it into core git)... though I am not sure if it affects\n> git-svn, or only HTTP(S) transport.\n> \n\nWow, I just signed up to the mainling list to post about this, but it turns\nout the latest message is exactly what I wanted to ask.\n\nLike Eric wrote, I'm pretty sure it is svn that is meant to store the\npassword here and the perl bindings or the git-svn part fails to deal with\nthe os x keychain right. With pure svn the keychain authentication works\njust fine. If I set up plaintext password storage in the svn configs, then\ngit svn is also able to store passwords.\n\nThere is also this macports ticket [1] that has been around for a while. But\nthat can only be fixed by an upstream fix here.\n\nI would love to help to get this working, but I'm not sure how I can.\n\nCheers,\nNikolaus\n\n\n[1] https://trac.macports.org/ticket/28329\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/git-svn-won-t-remember-pem-password-tp7295962p7298035.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"184956","messageId":"20120220005727.GA4140@sigill.intra.peff.net","threadId":"29658","inReplyTo":"m3zkcgqt0g.fsf@localhost.localdomain","subject":"Re: git-svn won't remember pem password","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-02-20T00:57:28Z","receivedAt":"2012-02-20T00:57:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 18, 2012 at 03:30:00AM -0800, Jakub Narebski wrote:\n\n> Igor <mrigor83@gmail.com> writes:\n> \n> > I'm running into an issue where I have to enter my pem certificate\n> > password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n> > uses OS X KeyChain and remembers my password just fine. Is there a\n> > known solution for this? Other users have ran into same issue as\n> > described here:\n> >\n> >   http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords\n> \n> > However, that solution of removing .subversion folder did not work\n> > for me.\n> \n> I don't know if it is svn that has to remember password, or git that\n> has to remember password.  Git 1.7.9 learned \"credentials API\" that\n> allows integration with platform native keychain mechanisms, and I\n> think OS X Keychain is one of examples / supported platforms (but it\n> might not made it into core git)... though I am not sure if it affects\n> git-svn, or only HTTP(S) transport.\n\nIt does not affect git-svn currently.\n\nI have some thoughts on providing access to the credentials API for\nscripts like git-svn (right now, it is accessible only by C git\nprograms). However, there is an important question: should password\nprompting in git-svn behave like git, or behave like svn?\n\nSo far, it has been the latter, and I think that is reasonable. The\nresource that requires the credentials is an svn repo, not a git repo,\nso you are more likely to want to share credentials for it with real\nsvn, and not other git commands.\n\nAs to the lack of keychain support, it looks like libsvn should be\nhandling this for us. We simply give it a callback function that gets\ncalled if the user needs prompted, but I would think things like the\nkeychain handling would happen before it gets to our prompt (and if I\nunderstand it, for _some_ credential storage formats, it does). So\neither there is a bug in libsvn, or we are somehow invoking it\nincorrectly.\n\n-Peff\n"},{"id":"184964","messageId":"D3380C12-D9AE-47EF-86D5-17352E4DF35C@nikolaus-demmel.de","threadId":"29658","inReplyTo":"20120220005727.GA4140@sigill.intra.peff.net","subject":"Re: git-svn won't remember pem password","fromName":"Nikolaus Demmel","fromEmail":"nikolaus@nikolaus-demmel.de","sentAt":"2012-02-20T03:08:36Z","receivedAt":"2012-02-20T03:08:36Z","isPatch":false,"sender":{"key":"nikolaus@nikolaus-demmel.de","avatar":"https://gravatar.com/avatar/2c9741b87d0f456387a06f577a904933d4614758202292a48ca1c739ebb48916?d=mp&s=160"},"body":"\nAm 20.02.2012 um 01:57 schrieb Jeff King:\n\n> On Sat, Feb 18, 2012 at 03:30:00AM -0800, Jakub Narebski wrote:\n> \n>> Igor <mrigor83@gmail.com> writes:\n>> \n>>> I'm running into an issue where I have to enter my pem certificate\n>>> password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n>>> uses OS X KeyChain and remembers my password just fine. Is there a\n>>> known solution for this? Other users have ran into same issue as\n>>> described here:\n>>> \n>>>  http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords\n>> \n>>> However, that solution of removing .subversion folder did not work\n>>> for me.\n>> \n>> I don't know if it is svn that has to remember password, or git that\n>> has to remember password.  Git 1.7.9 learned \"credentials API\" that\n>> allows integration with platform native keychain mechanisms, and I\n>> think OS X Keychain is one of examples / supported platforms (but it\n>> might not made it into core git)... though I am not sure if it affects\n>> git-svn, or only HTTP(S) transport.\n> \n> It does not affect git-svn currently.\n> \n> I have some thoughts on providing access to the credentials API for\n> scripts like git-svn (right now, it is accessible only by C git\n> programs). However, there is an important question: should password\n> prompting in git-svn behave like git, or behave like svn?\n> \n> So far, it has been the latter, and I think that is reasonable. The\n> resource that requires the credentials is an svn repo, not a git repo,\n> so you are more likely to want to share credentials for it with real\n> svn, and not other git commands.\n> \n\nIMHO a normal user would expect git-svn to store credentials in the same way as normal svn. I think this is the way it should be.\n\nBest regards,\nNikolaus"},{"id":"190130","messageId":"20120426180018.GX4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"20120219013011.GB31886@dcvr.yhbt.net","subject":"Re: git-svn won't remember pem password","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-26T18:00:18Z","receivedAt":"2012-04-26T18:00:18Z","isPatch":false,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi Igor,\n\n> > I'm running into an issue where I have to enter my pem certificate\n> > password every time I git-svn fetch or git-svn dcommit. Vanilla svn\n> > uses OS X KeyChain and remembers my password just fine. Is there a\n> > known solution for this? Other users have ran into same issue as\n> > described here:\n> > http://stackoverflow.com/questions/605519/does-git-svn-store-svn-passwords.\n> > However, that solution of removing .subversion folder did not work for\n> > me.\n\nI suspect this would be solved by including what svn calls \"platform\nspecific authentication providers\". This works on Linux, but I don't\nhave access to OSX for testing.\n\nCould you test the patch I pasted below to see if this fixes your\nproblem? The patch is made against the git source tree (git master\nversion), but you should probably be able to apply it to your installed\ngit-svn file as well (it's just a perl script). I'm not sure where that\nfile lives on OSX though, it's /usr/lib/git-core/git-svn on my Linux\n(Debian) system.\n\nEric, I think I got this feature sorted out finally (there is a second\npatch for entering the gnome-keyring unlock password which required some\nchanges in the subversion bindings which got applied a while ago). Let's\nsee what the patch does for Igor and then I'll send over both patches\nafterwards.\n\nGr.\n\nMatthijs\n"},{"id":"190129","messageId":"761A0E26-E2CB-4D50-8F7A-C562A929A372@gmail.com","threadId":"29658","inReplyTo":"20120426181327.GZ4023@login.drsnuggles.stderr.nl","subject":"Re: git-svn won't remember pem password","fromName":"Igor","fromEmail":"mrigor83@gmail.com","sentAt":"2012-04-26T18:31:03Z","receivedAt":"2012-04-26T18:31:03Z","isPatch":false,"sender":{"key":"mrigor83@gmail.com","avatar":null},"body":"Nice, that seems to work. I got prompted to allow access to my KeyChain.\n\nThanks!\n\nOn Apr 26, 2012, at 11:13 AM, Matthijs Kooijman wrote:\n\n>> Did you forget to attach the patch?\n> No, but I wrote it in invisible ink! But here's the patch in regular\n> ink, just in case.... *cough*\n> \n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -5436,7 +5436,7 @@ BEGIN {\n> }\n> \n> sub _auth_providers () {\n> -       [\n> +       my @rv = (\n>          SVN::Client::get_simple_provider(),\n>          SVN::Client::get_ssl_server_trust_file_provider(),\n>          SVN::Client::get_simple_prompt_provider(\n> @@ -5452,7 +5452,23 @@ sub _auth_providers () {\n>            \\&Git::SVN::Prompt::ssl_server_trust),\n>          SVN::Client::get_username_prompt_provider(\n>            \\&Git::SVN::Prompt::username, 2)\n> -       ]\n> +       );\n> +\n> +       # earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n> +       # this function\n> +       if ($SVN::Core::VERSION gt '1.6.12') {\n> +               my $config = SVN::Core::config_get_config($config_dir);\n> +               my ($p, @a);\n> +               # config_get_config returns all config files from\n> +               # ~/.subversion, auth_get_platform_specific_client_providers\n> +               # just wants the config \"file\".\n> +               @a = ($config->{'config'}, undef);\n> +               $p = SVN::Core::auth_get_platform_specific_client_providers(@a);\n> +               # Insert the return value from\n> +               # auth_get_platform_specific_providers\n> +               unshift @rv, @$p;\n> +       }\n> +       \\@rv;\n> }\n> \n> sub escape_uri_only {\n"},{"id":"190131","messageId":"20120426183634.GA4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"761A0E26-E2CB-4D50-8F7A-C562A929A372@gmail.com","subject":"Re: git-svn won't remember pem password","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-26T18:36:34Z","receivedAt":"2012-04-26T18:36:34Z","isPatch":false,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi Igor,\n\n> Nice, that seems to work. I got prompted to allow access to my KeyChain.\nThanks for the quick testing!\n\nEric, I'll send the patches in a minute.\n\nGr.\n\nMatthijs\n"},{"id":"190145","messageId":"1335468843-24653-1-git-send-email-matthijs@stdin.nl","threadId":"29658","inReplyTo":"20120426183634.GA4023@login.drsnuggles.stderr.nl","subject":"[PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-26T19:34:02Z","receivedAt":"2012-04-26T19:34:02Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"On Linux, this makes authentication using passwords from gnome-keyring\nand kwallet work (only the former was tested). On Mac OS X, this allows\nusing the OS X Keychain.\n---\n git-svn.perl |   20 ++++++++++++++++++--\n 1 file changed, 18 insertions(+), 2 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 4334b95..1790d10 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -5436,7 +5436,7 @@ BEGIN {\n }\n \n sub _auth_providers () {\n-\t[\n+\tmy @rv = (\n \t  SVN::Client::get_simple_provider(),\n \t  SVN::Client::get_ssl_server_trust_file_provider(),\n \t  SVN::Client::get_simple_prompt_provider(\n@@ -5452,7 +5452,23 @@ sub _auth_providers () {\n \t    \\&Git::SVN::Prompt::ssl_server_trust),\n \t  SVN::Client::get_username_prompt_provider(\n \t    \\&Git::SVN::Prompt::username, 2)\n-\t]\n+\t);\n+\n+\t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n+\t# this function\n+\tif ($SVN::Core::VERSION gt '1.6.12') {\n+\t\tmy $config = SVN::Core::config_get_config($config_dir);\n+\t\tmy ($p, @a);\n+\t\t# config_get_config returns all config files from\n+\t\t# ~/.subversion, auth_get_platform_specific_client_providers\n+\t\t# just wants the config \"file\".\n+\t\t@a = ($config->{'config'}, undef);\n+\t\t$p = SVN::Core::auth_get_platform_specific_client_providers(@a);\n+\t\t# Insert the return value from\n+\t\t# auth_get_platform_specific_providers\n+\t\tunshift @rv, @$p;\n+\t}\n+\t\\@rv;\n }\n \n sub escape_uri_only {\n-- \n1.7.10\n"},{"id":"190146","messageId":"1335468843-24653-2-git-send-email-matthijs@stdin.nl","threadId":"29658","inReplyTo":"1335468843-24653-1-git-send-email-matthijs@stdin.nl","subject":"[PATCH 2/2] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-26T19:34:03Z","receivedAt":"2012-04-26T19:34:03Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"This allows git-svn to prompt for a keyring unlock password, when a\nthe needed gnome keyring is locked.\n\nThis requires changes in the subversion perl bindings which have been\ncommitted to trunk (1241554 and some followup commits) and should be\navailable with the (as of yet unreleased) 1.8.0 release.\n---\n git-svn.perl |   20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 1790d10..6565f4a 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -4420,6 +4420,11 @@ sub username {\n \t$SVN::_Core::SVN_NO_ERROR;\n }\n \n+sub gnome_keyring_unlock {\n+\tmy ($keyring, $pool) = @_;\n+\t_read_password(\"Password for '$keyring' GNOME keyring: \", undef);\n+}\n+\n sub _read_password {\n \tmy ($prompt, $realm) = @_;\n \tmy $password = '';\n@@ -5524,6 +5529,21 @@ sub new {\n \t\t\t$Git::SVN::Prompt::_no_auth_cache = 1;\n \t\t}\n \t} # no warnings 'once'\n+\n+\n+\t# Allow git-svn to show a prompt for opening up a gnome-keyring, if needed.\n+\tif (defined(&SVN::Core::auth_set_gnome_keyring_unlock_prompt_func)) {\n+\t\tmy $keyring_callback = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(\n+\t\t\t$baton,\n+\t\t\t\\&Git::SVN::Prompt::gnome_keyring_unlock\n+\t\t);\n+\t\t# Keep a reference to this callback, to prevent the function\n+\t\t# (reference) from being garbage collected.  We just add it to\n+\t\t# the callbacks value, which are also used only to prevent the\n+\t\t# garbage collector from eating stuff.\n+\t\t$callbacks = [$callbacks, $keyring_callback]\n+\t}\n+\n \tmy $self = SVN::Ra->new(url => escape_url($url), auth => $baton,\n \t                      config => $config,\n \t\t\t      pool => SVN::Pool->new,\n-- \n1.7.10\n"},{"id":"190195","messageId":"20120427082118.GA7257@dcvr.yhbt.net","threadId":"29658","inReplyTo":"1335468843-24653-1-git-send-email-matthijs@stdin.nl","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-04-27T08:21:18Z","receivedAt":"2012-04-27T08:21:18Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> On Linux, this makes authentication using passwords from gnome-keyring\n> and kwallet work (only the former was tested). On Mac OS X, this allows\n> using the OS X Keychain.\n\nThanks, this looks good.  Can you add a Signed-off-by? (you can just\nreply here and I'll add it to the commit message when pushing.\n\nOtherwise, consider this Acked-by: Eric Wong <normalperson@yhbt.net>\n\n> +\t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n> +\t# this function\n> +\tif ($SVN::Core::VERSION gt '1.6.12') {\n\nThank you for documenting this segfault, btw.\n"},{"id":"190196","messageId":"20120427082559.GC4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"20120427082118.GA7257@dcvr.yhbt.net","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-27T08:25:59Z","receivedAt":"2012-04-27T08:25:59Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"> > On Linux, this makes authentication using passwords from gnome-keyring\n> > and kwallet work (only the former was tested). On Mac OS X, this allows\n> > using the OS X Keychain.\nSigned-off-by: Matthijs Kooijman <matthijs@stdin.nl>\n"},{"id":"190197","messageId":"20120427082840.GB7257@dcvr.yhbt.net","threadId":"29658","inReplyTo":"1335468843-24653-2-git-send-email-matthijs@stdin.nl","subject":"Re: [PATCH 2/2] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-04-27T08:28:40Z","receivedAt":"2012-04-27T08:28:40Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> This allows git-svn to prompt for a keyring unlock password, when a\n> the needed gnome keyring is locked.\n> \n> This requires changes in the subversion perl bindings which have been\n> committed to trunk (1241554 and some followup commits) and should be\n> available with the (as of yet unreleased) 1.8.0 release.\n\nI'm a hesitant to use/depend on unreleased functionality in SVN.\n\nIs there a chance the API could change before the release.  Also,\nwhat kind of tests do the SVN guys do on the Perl bindings + GNOME?\nI'm especially concerned since we just worked around segfault\nbugs in the other patch.\n\nCan we put this on hold until somebody can test the 1.8.0 release?\n"},{"id":"190198","messageId":"20120427082905.GD4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"1335468843-24653-2-git-send-email-matthijs@stdin.nl","subject":"Re: [PATCH 2/2] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-27T08:29:06Z","receivedAt":"2012-04-27T08:29:06Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi Eric,\n\njust noticed a minor typo in this commit message:\n\n> committed to trunk (1241554 and some followup commits) and should be\nI forgot to add an \"r\" in front of this revision number, so the line\nshould be:\n> committed to trunk (r1241554 and some followup commits) and should be\n\nNot a big deal of course, but slightly more readable.\n\nGr.\n\nMatthijs\n"},{"id":"190202","messageId":"20120427093618.GE4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"20120427082840.GB7257@dcvr.yhbt.net","subject":"Re: [PATCH 2/2] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-27T09:36:19Z","receivedAt":"2012-04-27T09:36:19Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi Eric,\n\n> > This requires changes in the subversion perl bindings which have been\n> > committed to trunk (1241554 and some followup commits) and should be\n> > available with the (as of yet unreleased) 1.8.0 release.\n> I'm a hesitant to use/depend on unreleased functionality in SVN.\n> \n> Is there a chance the API could change before the release.  Also, what\n> kind of tests do the SVN guys do on the Perl bindings + GNOME?  I'm\n> especially concerned since we just worked around segfault bugs in the\n> other patch.\nThere is a testcase for this particular function (though it only tests\ncalling the function, not the full workings because no gnome-keyring is\navailable in the testsuite).\n\nAs for the other segfault: the reason for that one was that apparently\nswig autogenerates bindings even when some typemaps are missing and then\njust puts an abort or failing assert or something like that in there.\nUnlikely to happen here, but I understand your restraint.\n\n> Can we put this on hold until somebody can test the 1.8.0 release?\nSure, the change won't be useful without svn 1.8.0 anyway (and since\nit's not a critical feature, we can live without it in the window\nbetween 1.8.0 and the next git release as well).\n\nI'll try to keep any eye on the 1.8.0 release. According to the svn\nroadmap [1] it is planned for july (1.7.0 + 9 months) but looking at the\nlist of features \"not started\", I'd say it might be later...\n\nhttp://subversion.apache.org/roadmap.html\n\nGr.\n\nMatthijs\n"},{"id":"190244","messageId":"20120429082341.GA32664@dcvr.yhbt.net","threadId":"29658","inReplyTo":"20120427082559.GC4023@login.drsnuggles.stderr.nl","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-04-29T08:23:41Z","receivedAt":"2012-04-29T08:23:41Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> > > On Linux, this makes authentication using passwords from gnome-keyring\n> > > and kwallet work (only the former was tested). On Mac OS X, this allows\n> > > using the OS X Keychain.\n> Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>\n\nThanks Matthijs, pushed to master of git://bogomips.org/git-svn for\nJunio.\n\n(actually pushed the other night, but I got distracted before\n sending this email :x)\n"},{"id":"190260","messageId":"7vvckihyqm.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"20120429082341.GA32664@dcvr.yhbt.net","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T00:03:45Z","receivedAt":"2012-04-30T00:03:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Matthijs Kooijman <matthijs@stdin.nl> wrote:\n>> > > On Linux, this makes authentication using passwords from gnome-keyring\n>> > > and kwallet work (only the former was tested). On Mac OS X, this allows\n>> > > using the OS X Keychain.\n>> Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>\n>\n> Thanks Matthijs, pushed to master of git://bogomips.org/git-svn for\n> Junio.\n>\n> (actually pushed the other night, but I got distracted before\n>  sending this email :x)\n\nThanks. Pulled.\n\nEric, if it is not too much trouble, I'd appreciate an update to RelNotes\nin pull requests.  I'll add the following to the \"Foreign Interface\"\nsection.\n\n Documentation/RelNotes/1.7.11.txt |    3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/RelNotes/1.7.11.txt b/Documentation/RelNotes/1.7.11.txt\nindex af73659..3609042 100644\n--- a/Documentation/RelNotes/1.7.11.txt\n+++ b/Documentation/RelNotes/1.7.11.txt\n@@ -47,6 +47,9 @@ Foreign Interface\n  * \"git svn\" used to die with unwanted SIGPIPE when talking with HTTP\n    server that uses keep-alive.\n \n+ * \"git svn\" learned to use platform specific authentication\n+   providers, e.g. gnome-keyring, kwallet, etc.\n+\n  * \"git p4\" has been moved out of contrib/ area.\n \n Performance\n"},{"id":"190270","messageId":"7vk40yhv5q.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"7vvckihyqm.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T01:21:05Z","receivedAt":"2012-04-30T01:21:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Eric Wong <normalperson@yhbt.net> writes:\n>\n>> Matthijs Kooijman <matthijs@stdin.nl> wrote:\n>>> > > On Linux, this makes authentication using passwords from gnome-keyring\n>>> > > and kwallet work (only the former was tested). On Mac OS X, this allows\n>>> > > using the OS X Keychain.\n>>> Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>\n>>\n>> Thanks Matthijs, pushed to master of git://bogomips.org/git-svn for\n>> Junio.\n>>\n>> (actually pushed the other night, but I got distracted before\n>>  sending this email :x)\n>\n> Thanks. Pulled.\n\nAs I am already too deep into today's integration round, I will not be\nrewinding this pull anymore, but on one of my Ubuntu 10.04 boxes, I am\nseeing this:\n\n    Initialized empty Git repository in\n    /srv/git/t/trash directory.t9118-git-svn-funky-branch-names/project/.git/\n    ValueError svn_auth_get_platform_specific_client_providers is not implemented yet\n\nSo the tip of 'master' may be broken for some \"git svn\" users.\n"},{"id":"190283","messageId":"20120430081939.GA27715@dcvr.yhbt.net","threadId":"29658","inReplyTo":"7vk40yhv5q.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-04-30T08:19:39Z","receivedAt":"2012-04-30T08:19:39Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> As I am already too deep into today's integration round, I will not be\n> rewinding this pull anymore, but on one of my Ubuntu 10.04 boxes, I am\n> seeing this:\n> \n>     Initialized empty Git repository in\n>     /srv/git/t/trash directory.t9118-git-svn-funky-branch-names/project/.git/\n>     ValueError svn_auth_get_platform_specific_client_providers is not implemented yet\n\nWhich version of SVN is that?  (git svn --version)\nhttp://packages.ubuntu.com/lucid/libsvn-perl says 1.6.6\n(+distro patches), which shouldn't be affected by this patch...\n\nMatthijs: any suggestions/ideas on what could be wrong?\n\n> So the tip of 'master' may be broken for some \"git svn\" users.\n\n-- \nEric Wong\n"},{"id":"190311","messageId":"7vipghgq9a.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"20120430081939.GA27715@dcvr.yhbt.net","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-30T16:04:33Z","receivedAt":"2012-04-30T16:04:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Which version of SVN is that?  (git svn --version)\n> http://packages.ubuntu.com/lucid/libsvn-perl says 1.6.6\n> (+distro patches), which shouldn't be affected by this patch...\n\n: a00 git.git/master; git version\ngit version 1.7.10.405.g10d433\n: a00 git.git/master; git svn --version\ngit-svn version 1.7.10.405.g10d433 (svn 1.6.6)\n: a00 git.git/master; dpkg -l libsvn-perl\nDesired=Unknown/Install/Remove/Purge/Hold\n|\nStatus=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend\n|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)\n||/ Name              Version           Description\n+++-=================-=================-==================================================\nii  libsvn-perl       1.6.6dfsg-2ubuntu Perl bindings for Subversion\n: a00 git.git/master; cd t\n: a00 t/master; sh t9100-git-svn-basic.sh -i -v\nInitialized empty Git repository in /scratch/buildfarm/git.git/t/trash\ndirectory.t9100-git-svn-basic/.git/\ndefine NO_SVN_TESTS to skip git svn tests\nexpecting success:\n        mkdir import &&\n        (\n                cd import &&\n                echo foo >foo &&\n                ln -s foo foo.link\n                mkdir -p dir/a/b/c/d/e &&\n                echo \"deep dir\" >dir/a/b/c/d/e/file &&\n                mkdir bar &&\n                echo \"zzz\" >bar/zzz &&\n                echo \"#!/bin/sh\" >exec.sh &&\n                chmod +x exec.sh &&\n                svn_cmd import -m \"import for git svn\" . \"$svnrepo\"\n                >/dev/null\n        ) &&\n        rm -rf import &&\n        git svn init \"$svnrepo\"\nok 1 - initialize git svn\n\nexpecting success: git svn fetch\nValueError svn_auth_get_platform_specific_client_providers is not\nimplemented yet\n\nnot ok - 2 import an SVN revision into git\n#       git svn fetch\n"},{"id":"190316","messageId":"20120430165315.GO4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"7vipghgq9a.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-30T16:53:15Z","receivedAt":"2012-04-30T16:53:15Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi folks,\n\nI could reproduce this problem (after installing half a dozen Ubuntue perl\npackages on my Debian system ;-p). It seems the problem is because the\nversion comparison is wrong:\n\n        if ($SVN::Core::VERSION gt '1.6.12') {\n\nThis does textual comparison, so 1.6.6 > 1.6.12. To do proper version\ncomparison, I think the version numbers should be split into\nmajor/minor/revision and each be compared numerically.\n\nThis is not the only place where this comparison happens in this way,\nthere are 6 more comparisons in this way, which would have to be fixed\nas well.\n\nWe could introduce a helper function for comparing version numbers by\nsplitting and comparing the parts separately, but that might be hard to\nget right (especially when non-numeric version parts are involved).\n\nAn alternative would be to use the Sort::Versions perl module [1] for\nthis, but that would add an external dependency.\n\nI'd be happy to code and test both approaches, just let me know which\nwould be preferred.\n\n[1]: http://search.cpan.org/~edavis/Sort-Versions-1.5/Versions.pm\n\nGr.\n\nMatthijs\n"},{"id":"190331","messageId":"20120430190200.GA27108@dcvr.yhbt.net","threadId":"29658","inReplyTo":"20120430165315.GO4023@login.drsnuggles.stderr.nl","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-04-30T19:02:00Z","receivedAt":"2012-04-30T19:02:00Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> Hi folks,\n> \n> I could reproduce this problem (after installing half a dozen Ubuntue perl\n> packages on my Debian system ;-p). It seems the problem is because the\n> version comparison is wrong:\n> \n>         if ($SVN::Core::VERSION gt '1.6.12') {\n> \n> This does textual comparison, so 1.6.6 > 1.6.12. To do proper version\n> comparison, I think the version numbers should be split into\n> major/minor/revision and each be compared numerically.\n> \n> This is not the only place where this comparison happens in this way,\n> there are 6 more comparisons in this way, which would have to be fixed\n> as well.\n\nAh, thanks for the analysis, we were lucky in the past that all version\ncomponents only had a single character.\n\n> We could introduce a helper function for comparing version numbers by\n> splitting and comparing the parts separately, but that might be hard to\n> get right (especially when non-numeric version parts are involved).\n> \n> An alternative would be to use the Sort::Versions perl module [1] for\n> this, but that would add an external dependency.\n> \n> I'd be happy to code and test both approaches, just let me know which\n> would be preferred.\n\nI think the former is preferable for git.  Sort::Versions isn't used\nanywhere else in git and I don't think it's widely installed.\n"},{"id":"190335","messageId":"20120430192016.GQ4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"20120430190200.GA27108@dcvr.yhbt.net","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-04-30T19:20:16Z","receivedAt":"2012-04-30T19:20:16Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi Eric,\n\n> > This does textual comparison, so 1.6.6 > 1.6.12. To do proper version\n> > comparison, I think the version numbers should be split into\n> > major/minor/revision and each be compared numerically.\n> \n> Ah, thanks for the analysis, we were lucky in the past that all version\n> components only had a single character.\nIndeed. Note that this includes the released subversion versions. For\nexample, the code contains this check:\n\n    $SVN::Core::VERSION le '1.5.4'\n\nand 1.5.10 < 1.5.4. Fortunately, 1.5.9 was the last release in the 1.5\nseries, and no other checks compare against 1.6.x.\n\nIf subversion would ever reach the 1.10.x version number, things would\nalso start breaking.\n\n> I think the former is preferable for git.  Sort::Versions isn't used\n> anywhere else in git and I don't think it's widely installed.\nI guessed as much. I'll have a look at providing a patch.\n\nGr.\n\nMatthijs\n"},{"id":"190377","messageId":"7vy5pcd7xu.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"20120430192016.GQ4023@login.drsnuggles.stderr.nl","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-05-01T01:08:29Z","receivedAt":"2012-05-01T01:08:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthijs Kooijman <matthijs@stdin.nl> writes:\n\n> Hi Eric,\n>\n>> > This does textual comparison, so 1.6.6 > 1.6.12. To do proper version\n>> > comparison, I think the version numbers should be split into\n>> > major/minor/revision and each be compared numerically.\n>> \n>> Ah, thanks for the analysis, we were lucky in the past that all version\n>> components only had a single character.\n> Indeed. Note that this includes the released subversion versions. For\n> example, the code contains this check:\n>\n>     $SVN::Core::VERSION le '1.5.4'\n>\n> and 1.5.10 < 1.5.4. Fortunately, 1.5.9 was the last release in the 1.5\n> series, and no other checks compare against 1.6.x.\n>\n> If subversion would ever reach the 1.10.x version number, things would\n> also start breaking.\n>\n>> I think the former is preferable for git.  Sort::Versions isn't used\n>> anywhere else in git and I don't think it's widely installed.\n\nOk, something along the lines of this.  Perhaps instead of \"compare_\",\nwe may want to call it \"require_\", so that negative return maps naturally\nto a failure.\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 427da9e..4a2ec43 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -41,11 +41,28 @@ sub fatal (@) { print STDERR \"@_\\n\"; exit 1 }\n # repository decides to close the connection which we expect to be kept alive.\n $SIG{PIPE} = 'IGNORE';\n \n+# Given a dot separated version number, \"subtract\" it from\n+# the SVN::Core::VERSION; non-negaitive return means the SVN::Core\n+# is at least at the version the caller asked for.\n+sub compare_svn_version {\n+\tmy (@ours) = split(/\\./, $SVN::Core::VERSION);\n+\tmy (@theirs) = split(/\\./, $_[0]);\n+\tmy ($i, $diff);\n+\n+\tfor ($i = 0; $i < @ours && $i < @theirs; $i++) {\n+\t\t$diff = $ours[$i] - $theirs[$i];\n+\t\treturn $diff if ($diff);\n+\t}\n+\treturn 1 if ($i < @ours);\n+\treturn -1 if ($i < @theirs);\n+\treturn 0;\n+}\n+\n sub _req_svn {\n \trequire SVN::Core; # use()-ing this causes segfaults for me... *shrug*\n \trequire SVN::Ra;\n \trequire SVN::Delta;\n-\tif ($SVN::Core::VERSION lt '1.1.0') {\n+\tif (compare_svn_version('1.1.0') < 0) {\n \t\tfatal \"Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)\";\n \t}\n }\n@@ -1474,7 +1491,7 @@ sub cmd_info {\n \t}\n \t::_req_svn();\n \t$result .= \"Repository UUID: $uuid\\n\" unless $diff_status eq \"A\" &&\n-\t\t($SVN::Core::VERSION le '1.5.4' || $file_type ne \"dir\");\n+\t\t(compare_svn_version('1.5.4') <= 0 || $file_type ne \"dir\");\n \t$result .= \"Revision: \" . ($diff_status eq \"A\" ? 0 : $rev) . \"\\n\";\n \n \t$result .= \"Node Kind: \" .\n@@ -5464,7 +5481,7 @@ sub _auth_providers () {\n \n \t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n \t# this function\n-\tif ($SVN::Core::VERSION gt '1.6.12') {\n+\tif (compare_svn_version('1.6.12') > 0) {\n \t\tmy $config = SVN::Core::config_get_config($config_dir);\n \t\tmy ($p, @a);\n \t\t# config_get_config returns all config files from\n@@ -5623,7 +5640,7 @@ sub get_log {\n \t# drop it.  Therefore, the receiver callback passed to it\n \t# is made aware of this limitation by being wrapped if\n \t# the limit passed to is being wrapped.\n-\tif ($SVN::Core::VERSION le '1.2.0') {\n+\tif (compare_svn_version('1.2.0') <= 0) {\n \t\tmy $limit = splice(@args, 3, 1);\n \t\tif ($limit > 0) {\n \t\t\tmy $receiver = pop @args;\n@@ -5655,7 +5672,8 @@ sub trees_match {\n \n sub get_commit_editor {\n \tmy ($self, $log, $cb, $pool) = @_;\n-\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef, 0) : ();\n+\t\n+\tmy @lock = (compare_svn_version('1.2.0') >= 0) ? (undef, 0) : ();\n \t$self->SUPER::get_commit_editor($log, $cb, @lock, $pool);\n }\n \n@@ -5673,7 +5691,7 @@ sub gs_do_update {\n \tmy (@pc) = split m#/#, $path;\n \tmy $reporter = $self->do_update($rev_b, (@pc ? shift @pc : ''),\n \t                                1, $editor, $pool);\n-\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n+\tmy @lock = (compare_svn_version('1.2.0') >= 0) ? (undef) : ();\n \n \t# Since we can't rely on svn_ra_reparent being available, we'll\n \t# just have to do some magic with set_path to make it so\n@@ -5723,7 +5741,7 @@ sub gs_do_switch {\n \t$ra ||= $self;\n \t$url_b = escape_url($url_b);\n \tmy $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);\n-\tmy @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();\n+\tmy @lock = (compare_svn_version('1.2.0') >= 0) ? (undef) : ();\n \t$reporter->set_path('', $rev_a, 0, @lock, $pool);\n \t$reporter->finish_report($pool);\n \n"},{"id":"192750","messageId":"20120603104914.GA21276@hashpling.org","threadId":"29658","inReplyTo":"7vy5pcd7xu.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2012-06-03T10:49:14Z","receivedAt":"2012-06-03T10:49:14Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Mon, Apr 30, 2012 at 06:08:29PM -0700, Junio C Hamano wrote:\n> \n> Ok, something along the lines of this.  Perhaps instead of \"compare_\",\n> we may want to call it \"require_\", so that negative return maps naturally\n> to a failure.\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 427da9e..4a2ec43 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n\nsnip\n\n> @@ -5464,7 +5481,7 @@ sub _auth_providers () {\n>  \n>  \t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n>  \t# this function\n> -\tif ($SVN::Core::VERSION gt '1.6.12') {\n> +\tif (compare_svn_version('1.6.12') > 0) {\n>  \t\tmy $config = SVN::Core::config_get_config($config_dir);\n>  \t\tmy ($p, @a);\n>  \t\t# config_get_config returns all config files from\n\nI presume this patch turned into this commit:\n\ncommit f760c903b8525878cd3b426fc61a7a2cf8742609\nAuthor: Junio C Hamano <gitster@pobox.com>\nDate:   Wed May 2 19:53:50 2012 +0000\n\n    git-svn: introduce SVN version comparison function\n\nAlthough it was advertised as fixing the breakage introduced by\n082afee621aeb2d3746c8ae290af98823f981f34 it didn't fix things for me.\nAlthough I haven't investigate why, trial and error proved that I\ncould fix it if I changed the comparison to:\n\n       if (::compare_svn_version('1.6.13') > 0) {\n\nFor me:\n$ svn --version --quiet\n1.6.13\n\nIs this the correct fix or do I have a bad svn install on my linux\nbox?\n\nCharles.\n"},{"id":"192773","messageId":"7vfwacxe7p.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"20120603104914.GA21276@hashpling.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-03T21:44:42Z","receivedAt":"2012-06-03T21:44:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Charles Bailey <charles@hashpling.org> writes:\n\n>> @@ -5464,7 +5481,7 @@ sub _auth_providers () {\n>>  \n>>  \t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n>>  \t# this function\n>> -\tif ($SVN::Core::VERSION gt '1.6.12') {\n>> +\tif (compare_svn_version('1.6.12') > 0) {\n>>  \t\tmy $config = SVN::Core::config_get_config($config_dir);\n>>  \t\tmy ($p, @a);\n>>  \t\t# config_get_config returns all config files from\n>\n> I presume this patch turned into this commit:\n>\n> commit f760c903b8525878cd3b426fc61a7a2cf8742609\n> Author: Junio C Hamano <gitster@pobox.com>\n> Date:   Wed May 2 19:53:50 2012 +0000\n>\n>     git-svn: introduce SVN version comparison function\n>\n> Although it was advertised as fixing the breakage introduced by\n> 082afee621aeb2d3746c8ae290af98823f981f34 it didn't fix things for me.\n> Although I haven't investigate why, trial and error proved that I\n> could fix it if I changed the comparison to:\n>\n>        if (::compare_svn_version('1.6.13') > 0) {\n>\n> For me:\n> $ svn --version --quiet\n> 1.6.13\n>\n> Is this the correct fix or do I have a bad svn install on my linux\n> box?\n\nThe conversion from \"gt '1.6.12'\" to \"compare() > 0\" is correct, I\nthink, as the original wanted to make sure that you have 1.6.13 or\nnewer (in other words, '1.6.12' is not good enough, but '1.6.13' is).\nThe fix was about not doing string comparison between the version\nstring and '1.6.12' string, i.e.\n\n\tif (\"1.6.9\" gt '1.6.12') {\n\t\tuse the logic for newer versions\n\t}\n\nincorrectly used the logic for newer versions.  That was the only\nthing f760c90 (git-svn: introduce SVN version comparison function,\n2012-05-02) addressed.\n\nIt is possible that '1.6.12' is not the right cut-off point and the\nlogic may require a version newer than that but that is outside the\nscope of f760c90.\n\nThe cut-off point comes from 082afee (git-svn: use platform specific\nauth providers, 2012-04-26).\n\nMatthijs?  Eric?\n"},{"id":"192788","messageId":"20120604090016.GA4023@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"7vfwacxe7p.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2012-06-04T09:00:16Z","receivedAt":"2012-06-04T09:00:16Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hey folks,\n\n> It is possible that '1.6.12' is not the right cut-off point and the\n> logic may require a version newer than that but that is outside the\n> scope of f760c90.\nIt seems this is indeed the case. I can't remember what I based the\n1.6.12 on, but looking at the svn changelog [1], the first working version\nis 1.6.15:\n\n    Version 1.6.15\n    [...]\n       * improve some swig parameter mapping (r984565, r1035745)\n\n[1]: http://svn.apache.org/repos/asf/subversion/trunk/CHANGES\n\nGr.\n\nMatthijs\n"},{"id":"192836","messageId":"7vwr3mswsr.fsf@alter.siamese.dyndns.org","threadId":"29658","inReplyTo":"20120604090016.GA4023@login.drsnuggles.stderr.nl","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-04T19:26:44Z","receivedAt":"2012-06-04T19:26:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthijs Kooijman <matthijs@stdin.nl> writes:\n\n> It seems this is indeed the case. I can't remember what I based the\n> 1.6.12 on, but looking at the svn changelog [1], the first working version\n> is 1.6.15:\n>\n>     Version 1.6.15\n>     [...]\n>        * improve some swig parameter mapping (r984565, r1035745)\n>\n> [1]: http://svn.apache.org/repos/asf/subversion/trunk/CHANGES\n>\n> Gr.\n\nThanks.  I find that \"improve some mapping\" is a bit too subtle way\nto say \"we are fixing a bug that can lead to a segfault\" to my\ntaste, though ;-)\n\nEric, I can directly queue this as a regression fix in my tree, you\ncan eyeball and give your blessing (or \"No, that is wrong--here is\nthe right version\" is even better), or you can queue it and tell me\nto pull from you.  How do we want to proceed?\n\n-- >8 --\nSubject: [PATCH] git-svn: platform auth providers are working only on 1.6.15\n or newer\n\nMatthijs Kooijman reports that the cut-off point 082afee (git-svn:\nuse platform specific auth providers, 2012-04-26) set at 1.6.12 to\nuse this feature safely was incorrect, and it is 1.6.15 instead:\n\n    http://svn.apache.org/repos/asf/subversion/trunk/CHANGES\n    Version 1.6.15\n       * improve some swig parameter mapping (r984565, r1035745)\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-svn.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 1a17f94..abbd6b8 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -5481,7 +5481,7 @@ ()\n \n \t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n \t# this function\n-\tif (::compare_svn_version('1.6.12') > 0) {\n+\tif (::compare_svn_version('1.6.15') >= 0) {\n \t\tmy $config = SVN::Core::config_get_config($config_dir);\n \t\tmy ($p, @a);\n \t\t# config_get_config returns all config files from\n-- \n1.7.11.rc1.2.g33fe195\n"},{"id":"192838","messageId":"20120604193657.GA24738@dcvr.yhbt.net","threadId":"29658","inReplyTo":"7vwr3mswsr.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git-svn: use platform specific auth providers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2012-06-04T19:36:57Z","receivedAt":"2012-06-04T19:36:57Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Eric, I can directly queue this as a regression fix in my tree, you\n> can eyeball and give your blessing (or \"No, that is wrong--here is\n> the right version\" is even better), or you can queue it and tell me\n> to pull from you.  How do we want to proceed?\n\nLooks reasonable, you can queue directly\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> -- >8 --\n> Subject: [PATCH] git-svn: platform auth providers are working only on 1.6.15\n>  or newer\n> \n> Matthijs Kooijman reports that the cut-off point 082afee (git-svn:\n> use platform specific auth providers, 2012-04-26) set at 1.6.12 to\n> use this feature safely was incorrect, and it is 1.6.15 instead:\n> \n>     http://svn.apache.org/repos/asf/subversion/trunk/CHANGES\n>     Version 1.6.15\n>        * improve some swig parameter mapping (r984565, r1035745)\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  git-svn.perl | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 1a17f94..abbd6b8 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -5481,7 +5481,7 @@ ()\n>  \n>  \t# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have\n>  \t# this function\n> -\tif (::compare_svn_version('1.6.12') > 0) {\n> +\tif (::compare_svn_version('1.6.15') >= 0) {\n>  \t\tmy $config = SVN::Core::config_get_config($config_dir);\n>  \t\tmy ($p, @a);\n>  \t\t# config_get_config returns all config files from\n> -- \n"},{"id":"221255","messageId":"20130618163609.GD10217@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"20120427082840.GB7257@dcvr.yhbt.net","subject":"Re: [PATCH 2/2] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2013-06-18T16:36:10Z","receivedAt":"2013-06-18T16:36:10Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi folks,\n\nOn Fri, Apr 27, 2012 at 08:28:40AM +0000, Eric Wong wrote:\n> Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> > This allows git-svn to prompt for a keyring unlock password, when a\n> > the needed gnome keyring is locked.\n> > \n> > This requires changes in the subversion perl bindings which have been\n> > committed to trunk (1241554 and some followup commits) and should be\n> > available with the (as of yet unreleased) 1.8.0 release.\n> \n> I'm a hesitant to use/depend on unreleased functionality in SVN.\n> \n> Is there a chance the API could change before the release.  Also,\n> what kind of tests do the SVN guys do on the Perl bindings + GNOME?\n> I'm especially concerned since we just worked around segfault\n> bugs in the other patch.\n> \n> Can we put this on hold until somebody can test the 1.8.0 release?\n\nAfter over a year, Subversion has finally started with 1.8.0 release\ncandidates. I've rebased this patch and succesfully tested it against\n1.8.0-rc3.\n\nI'll send the updated patch over as a reply to this mail.\n\n\nAs for testing, it took a bit of messing to get all the paths correct,\nso I'll document what I did here.\n\nI used a the 1.8.0-rc3 tarball and ran:\n\n\tsubversion-1.8.0-rc3$ ./configure --prefix=/usr/local/svn\n\tsubversion-1.8.0-rc3$ make all install\n\tsubversion-1.8.0-rc3$ make swig-pl install-swig-pl PREFIX=/usr/local/svn\n\nI took a git master checkout with the patch applied and ran:\n\n\tgit$ make prefix=/usr/local/git all install\n\nThen, inside some git-svn clone, I ran:\n\n\t$ PERL5LIB=/usr/local/svn/local/lib/perl/5.14.2/ LD_LIBRARY_PATH=/usr/local/svn/lib/  /usr/local/git/bin/git svn rebase\n\tPassword for 'default' GNOME keyring:\n\tCurrent branch master is up to date.\n\nWhen removing the PERL5LIB and LD_LIBRARY_PATH variables to run against\nthe system version of subversion (1.6.17 here), I get an authorization\nfailure as before:\n\n\t$ /usr/local/git/bin/git svn rebase\n\tAuthorization failed: OPTIONS of 'http://svn.example.org': authorization failed: Could not authenticate to server: rejected Basic challenge (http://example.org) at /usr/local/git/share/perl/5.14.2/Git/SVN.pm line 717\n\nGr.\n\nMatthijs\n"},{"id":"221257","messageId":"1371573490-21973-1-git-send-email-matthijs@stdin.nl","threadId":"29658","inReplyTo":"20130618163609.GD10217@login.drsnuggles.stderr.nl","subject":"[PATCH] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2013-06-18T16:38:10Z","receivedAt":"2013-06-18T16:38:10Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"This allows git-svn to prompt for a keyring unlock password, when a\nthe needed gnome keyring is locked.\n\nThis requires changes in the subversion perl bindings which have been\ncommitted to svn trunk (r1241554 and some followup commits) and are\nfirst available in the 1.8.0 release.\n---\n perl/Git/SVN/Prompt.pm |  5 +++++\n perl/Git/SVN/Ra.pm     | 13 +++++++++++++\n 2 files changed, 18 insertions(+)\n\ndiff --git a/perl/Git/SVN/Prompt.pm b/perl/Git/SVN/Prompt.pm\nindex e940b08..faeda01 100644\n--- a/perl/Git/SVN/Prompt.pm\n+++ b/perl/Git/SVN/Prompt.pm\n@@ -23,6 +23,11 @@ sub simple {\n \t$SVN::_Core::SVN_NO_ERROR;\n }\n \n+sub gnome_keyring_unlock {\n+\tmy ($keyring, $pool) = @_;\n+\t_read_password(\"Password for '$keyring' GNOME keyring: \", undef);\n+}\n+\n sub ssl_server_trust {\n \tmy ($cred, $realm, $failures, $cert_info, $may_save, $pool) = @_;\n \t$may_save = undef if $_no_auth_cache;\ndiff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm\nindex 75ecc42..38ed0cb 100644\n--- a/perl/Git/SVN/Ra.pm\n+++ b/perl/Git/SVN/Ra.pm\n@@ -104,6 +104,19 @@ sub new {\n \t\t}\n \t} # no warnings 'once'\n \n+\t# Allow git-svn to show a prompt for opening up a gnome-keyring, if needed.\n+\tif (defined(&SVN::Core::auth_set_gnome_keyring_unlock_prompt_func)) {\n+\t\tmy $keyring_callback = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(\n+\t\t\t$baton,\n+\t\t\t\\&Git::SVN::Prompt::gnome_keyring_unlock\n+\t\t);\n+\t\t# Keep a reference to this callback, to prevent the function\n+\t\t# (reference) from being garbage collected.  We just add it to\n+\t\t# the callbacks value, which are also used only to prevent the\n+\t\t# garbage collector from eating stuff.\n+\t\t$callbacks = [$callbacks, $keyring_callback]\n+\t}\n+\n \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n \t                      config => $config,\n \t\t\t      pool => SVN::Pool->new,\n-- \n1.8.3.rc1\n"},{"id":"226145","messageId":"20130829094205.GO10217@login.drsnuggles.stderr.nl","threadId":"29658","inReplyTo":"1371573490-21973-1-git-send-email-matthijs@stdin.nl","subject":"Re: [PATCH] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Matthijs Kooijman","fromEmail":"matthijs@stdin.nl","sentAt":"2013-08-29T09:42:05Z","receivedAt":"2013-08-29T09:42:05Z","isPatch":true,"sender":{"key":"matthijs@stdin.nl","avatar":"https://avatars.githubusercontent.com/u/194491?v=4"},"body":"Hi folks,\n\nany chance this patch can be merged?\n\nGr.\n\nMatthijs\n\nOn Tue, Jun 18, 2013 at 06:38:10PM +0200, Matthijs Kooijman wrote:\n> This allows git-svn to prompt for a keyring unlock password, when a\n> the needed gnome keyring is locked.\n> \n> This requires changes in the subversion perl bindings which have been\n> committed to svn trunk (r1241554 and some followup commits) and are\n> first available in the 1.8.0 release.\n> ---\n>  perl/Git/SVN/Prompt.pm |  5 +++++\n>  perl/Git/SVN/Ra.pm     | 13 +++++++++++++\n>  2 files changed, 18 insertions(+)\n> \n> diff --git a/perl/Git/SVN/Prompt.pm b/perl/Git/SVN/Prompt.pm\n> index e940b08..faeda01 100644\n> --- a/perl/Git/SVN/Prompt.pm\n> +++ b/perl/Git/SVN/Prompt.pm\n> @@ -23,6 +23,11 @@ sub simple {\n>  \t$SVN::_Core::SVN_NO_ERROR;\n>  }\n>  \n> +sub gnome_keyring_unlock {\n> +\tmy ($keyring, $pool) = @_;\n> +\t_read_password(\"Password for '$keyring' GNOME keyring: \", undef);\n> +}\n> +\n>  sub ssl_server_trust {\n>  \tmy ($cred, $realm, $failures, $cert_info, $may_save, $pool) = @_;\n>  \t$may_save = undef if $_no_auth_cache;\n> diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm\n> index 75ecc42..38ed0cb 100644\n> --- a/perl/Git/SVN/Ra.pm\n> +++ b/perl/Git/SVN/Ra.pm\n> @@ -104,6 +104,19 @@ sub new {\n>  \t\t}\n>  \t} # no warnings 'once'\n>  \n> +\t# Allow git-svn to show a prompt for opening up a gnome-keyring, if needed.\n> +\tif (defined(&SVN::Core::auth_set_gnome_keyring_unlock_prompt_func)) {\n> +\t\tmy $keyring_callback = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(\n> +\t\t\t$baton,\n> +\t\t\t\\&Git::SVN::Prompt::gnome_keyring_unlock\n> +\t\t);\n> +\t\t# Keep a reference to this callback, to prevent the function\n> +\t\t# (reference) from being garbage collected.  We just add it to\n> +\t\t# the callbacks value, which are also used only to prevent the\n> +\t\t# garbage collector from eating stuff.\n> +\t\t$callbacks = [$callbacks, $keyring_callback]\n> +\t}\n> +\n>  \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n>  \t                      config => $config,\n>  \t\t\t      pool => SVN::Pool->new,\n> -- \n> 1.8.3.rc1\n> \n"},{"id":"226194","messageId":"20130829173813.GA25630@dcvr.yhbt.net","threadId":"29658","inReplyTo":"20130829094205.GO10217@login.drsnuggles.stderr.nl","subject":"Re: [PATCH] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-08-29T17:38:13Z","receivedAt":"2013-08-29T17:38:13Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Matthijs Kooijman <matthijs@stdin.nl> wrote:\n> Hi folks,\n> \n> any chance this patch can be merged?\n\nIt's probably fine.  Does anybody else have testing/feedback?  I haven't\nused git-svn/SVN in years, and I don't use GNOME (nor much GUI).\n"},{"id":"226195","messageId":"20130829175605.GA26368@dcvr.yhbt.net","threadId":"29658","inReplyTo":"35AE7D09-F859-4277-AC74-729BA1188D10@outoforder.cc","subject":"Re: [PATCH] git-svn: Configure a prompt callback for gnome_keyring.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-08-29T17:56:05Z","receivedAt":"2013-08-29T17:56:05Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Edward Rudd <urkle@outoforder.cc> wrote:\n> Where is a link to the latest patch? I can give it a quick once-over\n> with one of my git-svn'ed game ports I'm working on. (due for\n> launching on the 10th.. WOOHOO!)\n\nhttp://mid.gmane.org/1371573490-21973-1-git-send-email-matthijs@stdin.nl\nThanks!\n"}]}