{"thread":{"id":"10171","subject":"[PATCH] git-svn: respect Subversion's [auth] section configuration values","startedAt":"2007-10-06T18:57:19Z","lastAt":"2007-10-15T07:17:50Z","messageCount":7,"participants":["Eygene Ryabinkin","Eric Wong","Sam Vilain"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"55022","messageId":"20071006185719.GA3943@void.codelabs.ru","threadId":"10171","inReplyTo":null,"subject":"[PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-10-06T18:57:19Z","receivedAt":"2007-10-06T18:57:19Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\nconfiguration (~/.subversion/config) were not respected.  This was\nfixed: the default values for these parameters are set to 'yes' to\nfollow Subversion behaviour.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n git-svn.perl |   23 +++++++++++++++++++++++\n 1 files changed, 23 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 484b057..f7ef421 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3051,6 +3051,29 @@ sub new {\n \t  ]);\n \tmy $config = SVN::Core::config_get_config($config_dir);\n \t$RA = undef;\n+\tmy $dont_store_passwords = 1;\n+\tmy $conf_t = ${$config}{'config'};\n+\t{\n+\t\t# The usage of $SVN::_Core::SVN_CONFIG_* variables\n+\t\t# produces warnings that variables are used only once.\n+\t\t# I had not found the better way to shut them up, so\n+\t\t# warnings are disabled in this block.\n+\t\tno warnings;\n+\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n+\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n+\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,\n+\t\t    1) == 0) {\n+\t\t\tSVN::_Core::svn_auth_set_parameter($baton,\n+\t\t\t    $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,\n+\t\t\t    bless (\\$dont_store_passwords, \"_p_void\"));\n+\t\t}\n+\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n+\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n+\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,\n+\t\t    1) == 0) {\n+\t\t\t$Git::SVN::Prompt::_no_auth_cache = 1;\n+\t\t}\n+\t}\n \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n \t                      config => $config,\n \t\t\t      pool => SVN::Pool->new,\n-- \n1.5.3.2\n\n\n-- \nEygene\n"},{"id":"55035","messageId":"4708355B.4090403@vilain.net","threadId":"10171","inReplyTo":"20071006185719.GA3943@void.codelabs.ru","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-10-07T01:24:43Z","receivedAt":"2007-10-07T01:24:43Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Eygene Ryabinkin wrote:\n> Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\n> configuration (~/.subversion/config) were not respected.  This was\n> fixed: the default values for these parameters are set to 'yes' to\n> follow Subversion behaviour.\n>   \n\nI saw this in the svn api before.  It really is a strange API, requiring\nthe user to get things like this right.\n\n> Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n> ---\n>  git-svn.perl |   23 +++++++++++++++++++++++\n>  1 files changed, 23 insertions(+), 0 deletions(-)\n>\n> diff --git a/git-svn.perl b/git-svn.perl\n> index 484b057..f7ef421 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -3051,6 +3051,29 @@ sub new {\n>  \t  ]);\n>  \tmy $config = SVN::Core::config_get_config($config_dir);\n>  \t$RA = undef;\n> +\tmy $dont_store_passwords = 1;\n> +\tmy $conf_t = ${$config}{'config'};\n> +\t{\n> +\t\t# The usage of $SVN::_Core::SVN_CONFIG_* variables\n> +\t\t# produces warnings that variables are used only once.\n> +\t\t# I had not found the better way to shut them up, so\n> +\t\t# warnings are disabled in this block.\n> +\t\tno warnings;\n>   \n\nYou can use no warnings 'once';\n\n> +\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n> +\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n> +\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,\n> +\t\t    1) == 0) {\n> +\t\t\tSVN::_Core::svn_auth_set_parameter($baton,\n> +\t\t\t    $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,\n> +\t\t\t    bless (\\$dont_store_passwords, \"_p_void\"));\n> +\t\t}\n> +\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n> +\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n> +\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,\n> +\t\t    1) == 0) {\n> +\t\t\t$Git::SVN::Prompt::_no_auth_cache = 1;\n> +\t\t}\n> +\t}\n>  \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n>  \t                      config => $config,\n>  \t\t\t      pool => SVN::Pool->new,\n>   \n"},{"id":"55032","messageId":"20071007032241.GG14972@hand.yhbt.net","threadId":"10171","inReplyTo":"20071006185719.GA3943@void.codelabs.ru","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-10-07T03:22:41Z","receivedAt":"2007-10-07T03:22:41Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> wrote:\n> Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\n> configuration (~/.subversion/config) were not respected.  This was\n> fixed: the default values for these parameters are set to 'yes' to\n> follow Subversion behaviour.\n\nThanks.\n\n> Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  git-svn.perl |   23 +++++++++++++++++++++++\n>  1 files changed, 23 insertions(+), 0 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 484b057..f7ef421 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -3051,6 +3051,29 @@ sub new {\n>  \t  ]);\n>  \tmy $config = SVN::Core::config_get_config($config_dir);\n>  \t$RA = undef;\n> +\tmy $dont_store_passwords = 1;\n> +\tmy $conf_t = ${$config}{'config'};\n> +\t{\n> +\t\t# The usage of $SVN::_Core::SVN_CONFIG_* variables\n> +\t\t# produces warnings that variables are used only once.\n> +\t\t# I had not found the better way to shut them up, so\n> +\t\t# warnings are disabled in this block.\n> +\t\tno warnings;\n> +\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n> +\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n> +\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,\n> +\t\t    1) == 0) {\n> +\t\t\tSVN::_Core::svn_auth_set_parameter($baton,\n> +\t\t\t    $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,\n> +\t\t\t    bless (\\$dont_store_passwords, \"_p_void\"));\n> +\t\t}\n> +\t\tif (SVN::_Core::svn_config_get_bool($conf_t,\n> +\t\t    $SVN::_Core::SVN_CONFIG_SECTION_AUTH,\n> +\t\t    $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,\n> +\t\t    1) == 0) {\n> +\t\t\t$Git::SVN::Prompt::_no_auth_cache = 1;\n> +\t\t}\n> +\t}\n>  \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n>  \t                      config => $config,\n>  \t\t\t      pool => SVN::Pool->new,\n\n-- \nEric Wong\n"},{"id":"55031","messageId":"20071007032446.GH14972@hand.yhbt.net","threadId":"10171","inReplyTo":"4708355B.4090403@vilain.net","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-10-07T03:24:46Z","receivedAt":"2007-10-07T03:24:46Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Sam Vilain <sam@vilain.net> wrote:\n> Eygene Ryabinkin wrote:\n> > +\t\t# The usage of $SVN::_Core::SVN_CONFIG_* variables\n> > +\t\t# produces warnings that variables are used only once.\n> > +\t\t# I had not found the better way to shut them up, so\n> > +\t\t# warnings are disabled in this block.\n> > +\t\tno warnings;\n> >   \n> \n> You can use no warnings 'once';\n\nInteresting, I should use that globally in git-svn and get rid of the\n$kill_stupid_warnings variable :)\n\n-- \nEric Wong\n"},{"id":"55043","messageId":"20071007101437.GB3943@void.codelabs.ru","threadId":"10171","inReplyTo":"4708355B.4090403@vilain.net","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-10-07T10:14:37Z","receivedAt":"2007-10-07T10:14:37Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Eric, Sam, good day.\n\nSat, Oct 06, 2007 at 08:22:41PM -0700, Eric Wong wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> wrote:\n> > Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\n> > configuration (~/.subversion/config) were not respected.  This was\n> > fixed: the default values for these parameters are set to 'yes' to\n> > follow Subversion behaviour.\n> \n> Thanks.\n\nYou're welcome ;))\n\nSun, Oct 07, 2007 at 02:24:43PM +1300, Sam Vilain wrote:\n> Eygene Ryabinkin wrote:\n> > Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\n> > configuration (~/.subversion/config) were not respected.  This was\n> > fixed: the default values for these parameters are set to 'yes' to\n> > follow Subversion behaviour.\n> >   \n> \n> I saw this in the svn api before.  It really is a strange API, requiring\n> the user to get things like this right.\n\nYes, the need to parse the configuration and set some flags is\nrather strange.  Looks like nobody cared to stuff the code like\nI had added to the configuration file parsing routines.\n\n> You can use no warnings 'once';\n\nGreat, thanks for the pointer!  Eric, do you want me to produce\nanother patch or you'll correct mine?\n-- \nEygene\n"},{"id":"55092","messageId":"20071007214334.GA7442@untitled","threadId":"10171","inReplyTo":"20071007101437.GB3943@void.codelabs.ru","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-10-07T21:43:34Z","receivedAt":"2007-10-07T21:43:34Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> wrote:\n> Eric, Sam, good day.\n> Sun, Oct 07, 2007 at 02:24:43PM +1300, Sam Vilain wrote:\n> > Eygene Ryabinkin wrote:\n> > > Parameters 'store-passwords' and 'store-auth-creds' from Subversion's\n> > > configuration (~/.subversion/config) were not respected.  This was\n> > > fixed: the default values for these parameters are set to 'yes' to\n> > > follow Subversion behaviour.\n> > >   \n> > \n> > I saw this in the svn api before.  It really is a strange API, requiring\n> > the user to get things like this right.\n> \n> Yes, the need to parse the configuration and set some flags is\n> rather strange.  Looks like nobody cared to stuff the code like\n> I had added to the configuration file parsing routines.\n\nI think I started to look at it a while back and forgot about it :)\n\n> > You can use no warnings 'once';\n> \n> Great, thanks for the pointer!  Eric, do you want me to produce\n> another patch or you'll correct mine?\n\nGo ahead and produce another patch.  I haven't had much time to\nwork on git lately.\n\n-- \nEric Wong\n"},{"id":"55824","messageId":"20071015071750.GF984@void.codelabs.ru","threadId":"10171","inReplyTo":"20071007214334.GA7442@untitled","subject":"Re: [PATCH] git-svn: respect Subversion's [auth] section configuration values","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-10-15T07:17:50Z","receivedAt":"2007-10-15T07:17:50Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Eric, good day.\n\nSun, Oct 07, 2007 at 02:43:34PM -0700, Eric Wong wrote:\n> > Great, thanks for the pointer!  Eric, do you want me to produce\n> > another patch or you'll correct mine?\n> \n> Go ahead and produce another patch.  I haven't had much time to\n> work on git lately.\n\nOK, the patch will follow in the separate thread.  I had embedded\n\"no warnings 'once'\" both to my new code and to your code to get\nrid of the $kill_stupid_warnings.  I did it selectively to minimize\nthe impact of the \"no warnings\" pragma.\n-- \nEygene\n"}]}