You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/04/06 18:03:31 UTC
svn commit: r1465268 - in /subversion/trunk/subversion: svnadmin/svnadmin.c
tests/cmdline/svntest/main.py
Author: brane
Date: Sat Apr 6 16:03:30 2013
New Revision: 1465268
URL: http://svn.apache.org/r1465268
Log:
Follow up to r1464985 and r1465170, merge the two approaches to warning about
BDB deprecation.
* subversion/svnadmin/svnadmin.c (subcommand_open): Update comment and
print warning directly to stderr without creating an svn_error_t first.
* subversion/tests/cmdline/svntest/main.py (create_repos):
Adjust expected output and rename some local variables.
Modified:
subversion/trunk/subversion/svnadmin/svnadmin.c
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1465268&r1=1465267&r2=1465268&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Sat Apr 6 16:03:30 2013
@@ -644,16 +644,20 @@ subcommand_create(apr_getopt_t *os, void
if (opt_state->fs_type)
{
- /* The non-default Berkeley DB backend is deprecated. */
+ /* 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_error_t *const warning = svn_error_createf(
- SVN_WARNING, NULL,
- _("The '%s' repository back-end is deprecated,"
- " consider using '%s' instead."),
- SVN_FS_TYPE_BDB, SVN_FS_TYPE_FSFS);
- svn_handle_warning2(stderr, warning, "svnadmin: ");
- svn_error_clear(warning);
+ SVN_ERR(svn_cmdline_fprintf(
+ stderr, pool,
+ _("%swarning:"
+ " The \"%s\" repository back-end is deprecated,"
+ " consider using \"%s\" instead.\n"),
+ "svnadmin: ", SVN_FS_TYPE_BDB, SVN_FS_TYPE_FSFS));
+ fflush(stderr);
}
svn_hash_sets(fs_config, SVN_FS_CONFIG_FS_TYPE, opt_state->fs_type);
}
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1465268&r1=1465267&r2=1465268&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Sat Apr 6 16:03:30 2013
@@ -882,19 +882,21 @@ def create_repos(path, minor_version = N
# Skip tests if we can't create the repository.
if stderr:
stderr_lines = 0
- using_bdb_backend = (options.fs_type == "bdb")
- bdb_deprecation_warning = False
+ not_using_fsfs_backend = (options.fs_type != "fsfs")
+ backend_deprecation_warning = False
for line in stderr:
stderr_lines += 1
if line.find('Unknown FS type') != -1:
raise Skip
- if using_bdb_backend:
- if line.find("The 'bdb' repository back-end is deprecated") != -1:
- bdb_deprecation_warning = True
+ if not_using_fsfs_backend:
+ if 0 < line.find('repository back-end is deprecated, consider using'):
+ backend_deprecation_warning = True
# Creating BDB repositories will cause svnadmin to print a warning
# which should be ignored.
- if using_bdb_backend and bdb_deprecation_warning and stderr_lines == 1:
+ if (stderr_lines == 1
+ and not_using_fsfs_backend
+ and backend_deprecation_warning):
pass
else:
# If the FS type is known and we noticed more than just the