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

Re: svn commit: r1464985 - in /subversion/trunk/subversion: svnadmin/svnadmin.c tests/cmdline/svntest/main.py

From: Ben Reser <ben_at_reser.org>
Date: Fri, 5 Apr 2013 20:14:53 -0700

On Fri, Apr 5, 2013 at 7:11 AM, <brane_at_apache.org> wrote:
> Author: brane
> Date: Fri Apr 5 14:11:49 2013
> New Revision: 1464985
>
> URL: http://svn.apache.org/r1464985
> Log:
> Make "svnadmin create --fs-type=bdb" warn about the BDB back-end deprecation.
>
> * subversion/svnadmin/svnadmin.c (subcommand_create): Print a warning to stderr
> if the requested filesystem type is "bdb".
>
> * subversion/tests/cmdline/svntest/main.py (create_repos): Expect the output
> of "svnadmin create" to contain that warning.

I actually started doing this today while I was on a plane since you
hadn't gotten around to it.

My code ended up looking very similar to yours:
[[[
      /* With 1.8 we are announcing that BDB is deprecated. No support
       * has been removed and it will continue to work until some future
       * date. The purpose here is to discourage people from creating
       * new BDB repositories which they will need to dump/load into
       * FSFS or some new FS type in the future. */
      if (0 == strcmp(opt_state->fs_type, SVN_FS_TYPE_BDB))
        {
          SVN_ERR(svn_cmdline_fprintf(stderr, pool, _("%swarning: FS type '%s'"
                                                      " has been deprecated\n"),
                                      "svnadmin: ", opt_state->fs_type));
          fflush(stderr);
        }
      svn_hash_sets(fs_config, SVN_FS_CONFIG_FS_TYPE, opt_state->fs_type);
]]]

I've gone ahead and wrapped the error string in _() so it can be
translated and switched to using the constants for the fs type strings
in r1465170.

I didn't end up using svn_handle_warning2() because it just felt dirty
to build a svn_error_t just to print a warning (especially since
producing global pools is so slow). Nor did a generic warning code
seem useful. But I'm not going to change it now unless you agree.

I did like your fsfs suggestion though.
Received on 2013-04-06 05:15:31 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.