You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kouhei Sutou <ko...@cozmixng.org> on 2008/03/31 10:56:39 UTC

[PATCH] serf backend requires servers category configuration

Hi,

I found a difference between Neon backend and Serf backend.

Neon backend doesn't require SVN_CONFIG_CATEGORY_SERVERS
configuration but Serf backend does.

Index: subversion/libsvn_ra_serf/serf.c
===================================================================
--- subversion/libsvn_ra_serf/serf.c	(revision 30128)
+++ subversion/libsvn_ra_serf/serf.c	(working copy)
@@ -374,9 +374,12 @@
                  SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES, NULL);
 #endif
 
-  server_group = svn_config_find_group(config,
-                                       session->repos_url.hostname,
-                                       SVN_CONFIG_SECTION_GROUPS, pool);
+  if (config)
+    server_group = svn_config_find_group(config,
+                                         session->repos_url.hostname,
+                                         SVN_CONFIG_SECTION_GROUPS, pool);
+  else
+    server_group = NULL;
 
   if (server_group)
     {


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] serf backend requires servers category configuration

Posted by Lieven Govaerts <sv...@mobsol.be>.
Kouhei Sutou wrote:
> Hi,
> 
> 2008/4/1, Lieven Govaerts <sv...@mobsol.be>:
>> Silly question: what does svn do without your patch? Does it crash?
>>  Ignore configuration?
> 
> I don't know about svn but a Ruby script showed in
> http://svn.haxx.se/dev/archive-2008-03/0933.shtml
> is crashed.
> 
>> $ cat svn_test.rb
>> require 'svn/ra'
>> context = Svn::Client::Context.new
>> callbacks = Svn::Ra::Callbacks.new(context.auth_baton)
>> session = Svn::Ra::Session.open("http://localhost/", {}, callbacks)
>> session.commit_editor2("commit log") {}
> 

Committed your patch as r30159.

thanks, Lieven.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] serf backend requires servers category configuration

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

2008/4/1, Lieven Govaerts <sv...@mobsol.be>:
> Silly question: what does svn do without your patch? Does it crash?
>  Ignore configuration?

I don't know about svn but a Ruby script showed in
http://svn.haxx.se/dev/archive-2008-03/0933.shtml
is crashed.

> $ cat svn_test.rb
> require 'svn/ra'
> context = Svn::Client::Context.new
> callbacks = Svn::Ra::Callbacks.new(context.auth_baton)
> session = Svn::Ra::Session.open("http://localhost/", {}, callbacks)
> session.commit_editor2("commit log") {}

Thanks,
--
kou

>  Kouhei Sutou wrote:
>  > Hi,
>  >
>  > I found a difference between Neon backend and Serf backend.
>  >
>  > Neon backend doesn't require SVN_CONFIG_CATEGORY_SERVERS
>  > configuration but Serf backend does.
>  >
>  > Index: subversion/libsvn_ra_serf/serf.c
>  > ===================================================================
>  > --- subversion/libsvn_ra_serf/serf.c  (revision 30128)
>  > +++ subversion/libsvn_ra_serf/serf.c  (working copy)
>  > @@ -374,9 +374,12 @@
>  >                   SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES, NULL);
>  >  #endif
>  >
>  > -  server_group = svn_config_find_group(config,
>  > -                                       session->repos_url.hostname,
>  > -                                       SVN_CONFIG_SECTION_GROUPS, pool);
>  > +  if (config)
>  > +    server_group = svn_config_find_group(config,
>  > +                                         session->repos_url.hostname,
>  > +                                         SVN_CONFIG_SECTION_GROUPS, pool);
>  > +  else
>  > +    server_group = NULL;
>  >
>  >    if (server_group)
>  >      {
>  >
>  >
>  > Thanks,
>  > --
>  > kou
>  >
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>  > For additional commands, e-mail: dev-help@subversion.tigris.org
>  >
>  >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] serf backend requires servers category configuration

Posted by Lieven Govaerts <sv...@mobsol.be>.
Silly question: what does svn do without your patch? Does it crash? 
Ignore configuration?

Lieven

Kouhei Sutou wrote:
> Hi,
> 
> I found a difference between Neon backend and Serf backend.
> 
> Neon backend doesn't require SVN_CONFIG_CATEGORY_SERVERS
> configuration but Serf backend does.
> 
> Index: subversion/libsvn_ra_serf/serf.c
> ===================================================================
> --- subversion/libsvn_ra_serf/serf.c	(revision 30128)
> +++ subversion/libsvn_ra_serf/serf.c	(working copy)
> @@ -374,9 +374,12 @@
>                   SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES, NULL);
>  #endif
>  
> -  server_group = svn_config_find_group(config,
> -                                       session->repos_url.hostname,
> -                                       SVN_CONFIG_SECTION_GROUPS, pool);
> +  if (config)
> +    server_group = svn_config_find_group(config,
> +                                         session->repos_url.hostname,
> +                                         SVN_CONFIG_SECTION_GROUPS, pool);
> +  else
> +    server_group = NULL;
>  
>    if (server_group)
>      {
> 
> 
> Thanks,
> --
> kou
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org