On Monday 23 May 2011 02:02 PM, Stefan Sperling wrote:
On Mon, May 23, 2011 at 01:08:28PM +0530, Prabhu Gnana Sundar wrote:
Hi all,

      I have attached my recent patch along with this mail. Please
share your views.


Can you provide a log message, too?

Sure Stefan :)

Attaching the log message with this mail. Also attached is the updated
patch with the change that you suggested below.



Thanks and regards
Prabhu
Index: subversion/svnadmin/main.c
===================================================================
--- subversion/svnadmin/main.c  (revision 1126350)
+++ subversion/svnadmin/main.c  (working copy)
@@ -585,7 +585,6 @@
  {
    struct svnadmin_opt_state *opt_state = baton;
    svn_repos_t *repos;
-  apr_hash_t *config;
    apr_hash_t *fs_config = apr_hash_make(pool);

    /* Expect no more arguments. */
@@ -624,12 +623,9 @@
                   APR_HASH_KEY_STRING,
                   "1");

-  SVN_ERR(svn_config_get_config(&config, opt_state->config_dir, pool));
-  SVN_ERR(svn_cmdline__apply_config_options(config, opt_state->config_options,
-                                            "svnadmin: ", "--config-option"));
    SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
                             NULL, NULL,
-                           config, fs_config, pool));
+                           NULL, fs_config, pool));
We could wrap the above two lines into a single line.
So that we have just one line reading:

                             NULL, NULL, NULL, fs_config_pool));

Looks good to me, thanks!

    svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL);
    return SVN_NO_ERROR;
  }

when creating a repo svnadmin sends the 'config' parameter which is never used
since the 1.0.x, hence passing NULL

* subversion/svnadmin/main.c
  (subcommand_create): Passed NULL instead of the 'config' value since it is
                       never used.

                       Deleted the 'config' apr_hash and did not populate it
                       since it is never used.

                       Not setting the opt-state->config options


Patch by: Prabhu Gnana Sundar <prabhugs{_AT_}collab.net>
Suggested by: Kamesh Jayachandran <kamesh{_AT_}collab.net>
Index: subversion/svnadmin/main.c
===================================================================
--- subversion/svnadmin/main.c	(revision 1126350)
+++ subversion/svnadmin/main.c	(working copy)
@@ -585,7 +585,6 @@
 {
   struct svnadmin_opt_state *opt_state = baton;
   svn_repos_t *repos;
-  apr_hash_t *config;
   apr_hash_t *fs_config = apr_hash_make(pool);
 
   /* Expect no more arguments. */
@@ -624,12 +623,8 @@
                  APR_HASH_KEY_STRING,
                  "1");
 
-  SVN_ERR(svn_config_get_config(&config, opt_state->config_dir, pool));
-  SVN_ERR(svn_cmdline__apply_config_options(config, opt_state->config_options,
-                                            "svnadmin: ", "--config-option"));
   SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
-                           NULL, NULL,
-                           config, fs_config, pool));
+                           NULL, NULL, NULL, fs_config, pool));
   svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL);
   return SVN_NO_ERROR;
 }

Reply via email to