[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 1496 - trunk/subversion/include trunk/subversion/libsvn_subr

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-03-13 07:43:33 CET

kfogel@tigris.org writes:
> Log:
> Start beating on the config code, for issue 579. Note that there are
> still problems remaining. Note also that although it currently uses
> the single-big-config file approach, we're not necessarily committed
> to it -- just need to start somewhere to shake out the bugs in file
> parsing, which is just as true whether we go for single file or
> separate files.

In case anyone in a different time zone feels like debugging this
while I'm asleep, you can reproduce the current problem quite simply.
Put this in `~/.subversion/config':

[somesection]
option1 = value1
option2 = value2
option3 = value3
optionX = valueX

... and then apply this patch:

Index: ./subversion/clients/cmdline/main.c
===================================================================
--- ./subversion/clients/cmdline/main.c
+++ ./subversion/clients/cmdline/main.c Tue Mar 12 16:11:40 2002
@@ -34,6 +34,7 @@
 #include "svn_pools.h"
 #include "svn_wc.h"
 #include "svn_client.h"
+#include "svn_config.h"
 #include "svn_string.h"
 #include "svn_path.h"
 #include "svn_delta.h"
@@ -1048,6 +1049,26 @@
           return EXIT_FAILURE;
         }
     }
+
+ /* debugging code */
+ {
+ svn_config_t *cfg;
+ svn_string_t val;
+
+ svn_config_read_all (&cfg, pool);
+
+ svn_config_get (cfg, &val, "somesection", "option1", "NOT FOUND");
+ printf ("Found value: %s\n", val.data);
+
+ svn_config_get (cfg, &val, "somesection", "option2", "NOT FOUND");
+ printf ("Found value: %s\n", val.data);
+
+ svn_config_get (cfg, &val, "somesection", "option3", "NOT FOUND");
+ printf ("Found value: %s\n", val.data);
+
+ svn_config_get (cfg, &val, "somesection", "optionX", "NOT FOUND");
+ printf ("Found value: %s\n", val.data);
+ }
 
   err = (*subcommand->cmd_func) (os, &opt_state, pool);
   if (err)

... and then run any subversion command, for example:

   floss$ subversion/clients/cmdline/svn st -n
   Found value: value1
   Found value: NOT FOUND
   Found value: NOT FOUND
   Found value: NOT FOUND
   floss$

I don't anticipate this being difficult to track down, as it's quite
similar to another bug just fixed (see rev 1496), but I'm going to
sleep now, so it's fair game for anyone who wants it. :-)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 13 07:33:41 2002

This is an archived mail posted to the Subversion Dev mailing list.