You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/06/20 06:00:38 UTC
svn commit: r1494851 - in /subversion/branches/1.8.x: ./ STATUS
subversion/svnadmin/svnadmin.c
Author: svn-role
Date: Thu Jun 20 04:00:37 2013
New Revision: 1494851
URL: http://svn.apache.org/r1494851
Log:
Merge r1494223 from trunk:
* r1494223
Forbid 'svnadmin create --fs-type=fsfs --compatible-version=1.0'.
Justification:
Well, I hope no one will actually run into this error in a situation
where it matters, but I'll sleep better knowing we're strict about
input validation.
Votes:
+1: danielsh, rhuijben, stsp
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1494223
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1494851&r1=1494850&r2=1494851&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Jun 20 04:00:37 2013
@@ -193,12 +193,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1494223
- Forbid 'svnadmin create --fs-type=fsfs --compatible-version=1.0'.
- Justification:
- Well, I hope no one will actually run into this error in a situation
- where it matters, but I'll sleep better knowing we're strict about
- input validation.
- Votes:
- +1: danielsh, rhuijben, stsp
Modified: subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c?rev=1494851&r1=1494850&r2=1494851&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c Thu Jun 20 04:00:37 2013
@@ -685,6 +685,18 @@ subcommand_create(apr_getopt_t *os, void
svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1");
}
+ if (opt_state->compatible_version
+ && ! svn_version__at_least(opt_state->compatible_version, 1, 1, 0)
+ /* ### TODO: this NULL check hard-codes knowledge of the library's
+ default fs-type value */
+ && (opt_state->fs_type == NULL
+ || !strcmp(opt_state->fs_type, SVN_FS_TYPE_FSFS)))
+ {
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("Repositories compatible with 1.0.x must use "
+ "--fs-type=bdb"));
+ }
+
SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
NULL, NULL, NULL, fs_config, pool));
svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL);