You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2013/02/18 17:25:09 UTC

svn commit: r1447378 - /subversion/trunk/subversion/svn/svn.c

Author: philip
Date: Mon Feb 18 16:25:09 2013
New Revision: 1447378

URL: http://svn.apache.org/r1447378
Log:
Delay creating the client/wc context until after we have finished
tweaking the config hash so that the full config is available when
creating the context.  In particular the SQLite exclusive locking
flag is available when first opening the wc_db.

* subversion/svn/svn.c
  (sub_main): Create context later.

Modified:
    subversion/trunk/subversion/svn/svn.c

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1447378&r1=1447377&r2=1447378&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Mon Feb 18 16:25:09 2013
@@ -2456,11 +2456,6 @@ sub_main(int argc, const char *argv[], a
         return EXIT_ERROR(err);
     }
 
-  /* Create a client context object. */
-  command_baton.opt_state = &opt_state;
-  SVN_INT_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
-  command_baton.ctx = ctx;
-
   /* Relocation is infinite-depth only. */
   if (opt_state.relocate)
     {
@@ -2519,14 +2514,14 @@ sub_main(int argc, const char *argv[], a
         }
     }
 
-  cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
+  cfg_config = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
                             APR_HASH_KEY_STRING);
 
   /* Update the options in the config */
   if (opt_state.config_options)
     {
       svn_error_clear(
-          svn_cmdline__apply_config_options(ctx->config,
+          svn_cmdline__apply_config_options(cfg_hash,
                                             opt_state.config_options,
                                             "svn: ", "--config-option"));
     }
@@ -2541,6 +2536,11 @@ sub_main(int argc, const char *argv[], a
                    SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
                    "true");
 
+  /* Create a client context object. */
+  command_baton.opt_state = &opt_state;
+  SVN_INT_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
+  command_baton.ctx = ctx;
+
   /* If we're running a command that could result in a commit, verify
      that any log message we were given on the command line makes
      sense (unless we've also been instructed not to care).  This may