Author: stefan2
Date: Fri Aug 2 10:31:06 2013
New Revision: 1509609
URL: http://svn.apache.org/r1509609
Log:
On the log-addressing branch: Return an error when the format file
specifies logical addressing in a non-shared repo. Just disabling
logical addressing in that case could mask more severe issues.
* subversion/libsvn_fs_fs/fs_fs.c
(read_format): create an error if layout & addressing are inconsistent
Suggested by: danielsh
Modified:
subversion/branches/log-addressing/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/branches/log-addressing/subversion/libsvn_fs_fs/fs_fs.c
URL:
http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_fs_fs/fs_fs.c?rev=1509609&r1=1509608&r2=1509609&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_fs_fs/fs_fs.c
(original)
+++ subversion/branches/log-addressing/subversion/libsvn_fs_fs/fs_fs.c Fri Aug
2 10:31:06 2013
@@ -355,9 +355,14 @@ read_format(int *pformat,
svn_dirent_local_style(path, pool), buf->data);
}
- /* non-shared repositories never use logical addressing */
- if (!*max_files_per_dir)
- *min_log_addressing_rev = SVN_INVALID_REVNUM;
+ /* Non-shared repositories never use logical addressing.
+ * If the format file is inconsistent in that respect, something
+ * probably went wrong.
+ */
+ if (min_log_addressing_rev != SVN_INVALID_REVNUM && !*max_files_per_dir)
+ return svn_error_createf(SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL,
+ _("'%s' specifies logical addressing for a non-shared repository"),
+ svn_dirent_local_style(path, pool), buf->data);
return SVN_NO_ERROR;
}