summaryrefslogtreecommitdiff
path: root/subversion/libsvn_fs_fs/rep-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_fs_fs/rep-cache.h')
-rw-r--r--subversion/libsvn_fs_fs/rep-cache.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/subversion/libsvn_fs_fs/rep-cache.h b/subversion/libsvn_fs_fs/rep-cache.h
index 3ccb056..75072a0 100644
--- a/subversion/libsvn_fs_fs/rep-cache.h
+++ b/subversion/libsvn_fs_fs/rep-cache.h
@@ -40,6 +40,10 @@ svn_error_t *
svn_fs_fs__open_rep_cache(svn_fs_t *fs,
apr_pool_t *pool);
+/* Close the rep cache database associated with FS. */
+svn_error_t *
+svn_fs_fs__close_rep_cache(svn_fs_t *fs);
+
/* Set *EXISTS to TRUE iff the rep-cache DB file exists. */
svn_error_t *
svn_fs_fs__exists_rep_cache(svn_boolean_t *exists,
@@ -61,7 +65,8 @@ svn_fs_fs__walk_rep_reference(svn_fs_t *fs,
/* Return the representation REP in FS which has fulltext CHECKSUM.
REP is allocated in POOL. If the rep cache database has not been
- opened, just set *REP to NULL. */
+ opened, just set *REP to NULL. Returns SVN_ERR_FS_CORRUPT if
+ a reference beyond HEAD is detected. */
svn_error_t *
svn_fs_fs__get_rep_reference(representation_t **rep,
svn_fs_t *fs,
@@ -69,16 +74,13 @@ svn_fs_fs__get_rep_reference(representation_t **rep,
apr_pool_t *pool);
/* Set the representation REP in FS, using REP->CHECKSUM.
- Use POOL for temporary allocations.
-
- If the rep cache database has not been opened, this may be a no op.
+ Use POOL for temporary allocations. Returns SVN_ERR_FS_CORRUPT if
+ an existing reference beyond HEAD is detected.
- If REJECT_DUP is TRUE, return an error if there is an existing
- match for REP->CHECKSUM. */
+ If the rep cache database has not been opened, this may be a no op. */
svn_error_t *
svn_fs_fs__set_rep_reference(svn_fs_t *fs,
representation_t *rep,
- svn_boolean_t reject_dup,
apr_pool_t *pool);
/* Delete from the cache all reps corresponding to revisions younger
@@ -89,10 +91,14 @@ svn_fs_fs__del_rep_reference(svn_fs_t *fs,
apr_pool_t *pool);
/* Start a transaction to take an SQLite reserved lock that prevents
- other writes. */
+ other writes, call BODY, end the transaction, and return what BODY returned.
+ */
svn_error_t *
-svn_fs_fs__lock_rep_cache(svn_fs_t *fs,
- apr_pool_t *pool);
+svn_fs_fs__with_rep_cache_lock(svn_fs_t *fs,
+ svn_error_t *(*body)(void *baton,
+ apr_pool_t *pool),
+ void *baton,
+ apr_pool_t *pool);
#ifdef __cplusplus
}