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

[PATCH] git-svn: Initialize SVN::Client with svn config instead of, auth for "git svn branch".

From
MVMonard Vong <travelingsoul86@gmail.com>
Date
Jul 18, 2014, 14:58 UTC
Message-ID
<53C93611.7090705@gmail.com>

If a client certificate is required to connect to svn, "git svn branch" always prompt the user for the certificate location and password, even though those parameters are stored in svn file "server" located in svn config dir (generally ~/.subversion). On the opposite, "git svn info/init/dcommit" read the config dir and do not prompt if the parameters are set.

This commit initializes for "git svn branch", the SVN::Client with the 'config' option instead of 'auth'. As decribed in the SVN documentation, http://search.cpan.org/~mschwern/Alien-SVN-v1.7.17.1/src/subversion/subversion/bindings/swig/perl/native/Client.pm#METHODS the SVN::Client will then read cached authentication options.

Signed-off-by: Monard Vong <travelingsoul86@gmail.com>
---
  git-svn.perl | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/git-svn.perl b/git-svn.perl
index 0a32372..1f41ee1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1161,7 +1161,9 @@ sub cmd_branch {
      ::_req_svn();

      my $ctx = SVN::Client->new(
-        auth    => Git::SVN::Ra::_auth_providers(),
+        config => SVN::Core::config_get_config(
+            $Git::SVN::Ra::config_dir
+        ),
          log_msg => sub {
              ${ $_[0] } = defined $_message
                  ? $_message
-- 
1.9.3
Next: Eric Wong
Message 1 of 3 in “git-svn: Initialize SVN::Client with svn config instead of, auth for "git svn branch".”
  1. git-svn: Initialize SVN::Client with svn config instead of, auth for "git svn branch".Monard Vong, Jul 18, 2014
  2. Eric WongJul 23, 2014
  3. Monard VongJul 25, 2014

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

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