Author: philip
Date: Tue Jul 31 17:14:58 2012
New Revision: 1367683
URL: http://svn.apache.org/viewvc?rev=1367683&view=rev
Log:
Fix issue 4213, "svnadmin recover" fails on old format repositories.
* subversion/libsvn_fs_fs/fs_fs.c
(open_pack_or_rev_file): Return SVN_ERR_FS_NO_SUCH_REVISION for
old format repositories.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1367683&r1=1367682&r2=1367683&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Tue Jul 31 17:14:58 2012
@@ -1836,22 +1836,30 @@ open_pack_or_rev_file(apr_file_t **file,
err = svn_io_file_open(file, path,
APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool);
- if (err && APR_STATUS_IS_ENOENT(err->apr_err)
- && ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
{
- /* Could not open the file. This may happen if the
- * file once existed but got packed later. */
- svn_error_clear(err);
+ if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
+ {
+ /* Could not open the file. This may happen if the
+ * file once existed but got packed later. */
+ svn_error_clear(err);
- /* if that was our 2nd attempt, leave it at that. */
- if (retry)
- return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
- _("No such revision %ld"), rev);
+ /* if that was our 2nd attempt, leave it at that. */
+ if (retry)
+ return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
+ _("No such revision %ld"), rev);
- /* We failed for the first time. Refresh cache & retry. */
- SVN_ERR(update_min_unpacked_rev(fs, pool));
+ /* We failed for the first time. Refresh cache & retry. */
+ SVN_ERR(update_min_unpacked_rev(fs, pool));
- retry = TRUE;
+ retry = TRUE;
+ }
+ else
+ {
+ svn_error_clear(err);
+ return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
+ _("No such revision %ld"), rev);
+ }
}
else
{