You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/07/28 01:52:53 UTC
svn commit: r1151675 - in /subversion/branches/revprop-packing:
BRANCH-README subversion/libsvn_fs_fs/fs_fs.c
Author: danielsh
Date: Wed Jul 27 23:52:52 2011
New Revision: 1151675
URL: http://svn.apache.org/viewvc?rev=1151675&view=rev
Log:
On the revprop-packing branch, drop a heuristic from 'recover'.
* subversion/libsvn_fs_fs/fs_fs.c
(recover_body): Always check for the existence of MAX_REV's revprop
file, even when it's packed.
* BRANCH-README: Remove this task.
Modified:
subversion/branches/revprop-packing/BRANCH-README
subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/branches/revprop-packing/BRANCH-README
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/BRANCH-README?rev=1151675&r1=1151674&r2=1151675&view=diff
==============================================================================
--- subversion/branches/revprop-packing/BRANCH-README (original)
+++ subversion/branches/revprop-packing/BRANCH-README Wed Jul 27 23:52:52 2011
@@ -27,8 +27,6 @@ TODO:
* add some explicit tests for svnadmin upgrade/pack
(both revs and revrops)
-* drop heuristic in recover_body() uhohs=True
-
* ensure revprop path computations don't use the shard path for a packed revprop,
and vice-versa
Modified: subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c?rev=1151675&r1=1151674&r2=1151675&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c Wed Jul 27 23:52:52 2011
@@ -7327,36 +7327,21 @@ recover_body(void *baton, apr_pool_t *po
/* Before setting current, verify that there is a revprops file
for the youngest revision. (Issue #2992) */
- SVN_ERR(svn_io_check_path(path_revprops(fs, max_rev, pool),
- &youngest_revprops_kind, pool));
+ SVN_ERR(update_min_unpacked_revprop(fs, pool));
+ if (is_packed_revprop(fs, max_rev))
+ /* Possible when min_unpacked_rev == current+1 == max_rev+1. */
+ SVN_ERR(svn_io_check_path(path_revprops_pack(fs, max_rev, pool),
+ &youngest_revprops_kind, pool));
+ else
+ SVN_ERR(svn_io_check_path(path_revprops(fs, max_rev, pool),
+ &youngest_revprops_kind, pool));
+
if (youngest_revprops_kind == svn_node_none)
{
- svn_boolean_t uhohs = TRUE;
-
- /* No file? Hrm... maybe that's because this repository is
- packed and the youngest revision is in the revprops.db
- file? We can at least see if that's a possibility.
-
- ### TODO: Could we check for revprops in the revprops.db?
- ### What if rNNN legitimately has no revprops? */
- if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT
- && max_rev != REVPROP_ZERO)
- {
- svn_revnum_t min_unpacked_revprop;
-
- SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
- path_min_unpacked_revprop(fs, pool),
- pool));
- if (min_unpacked_revprop == (max_rev + 1))
- uhohs = FALSE;
- }
- if (uhohs)
- {
- return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- _("Revision %ld has a revs file but no "
- "revprops file"),
- max_rev);
- }
+ return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+ _("Revision %ld has a revs file but no "
+ "revprops file"),
+ max_rev);
}
else if (youngest_revprops_kind != svn_node_file)
{