On Thu, May 5, 2011 at 15:50, <hwright_at_apache.org> wrote:
> +++ subversion/trunk/subversion/libsvn_wc/wc_db_util.c Thu May 5 19:50:39 2011
> @@ -91,3 +91,59 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
> 0, NULL,
> result_pool, scratch_pool));
> +/* Some helpful transaction helpers.
> + Instead of directly using SQLite transactions, these wrappers take care of
> + simple cases by allowing consumers to worry about wrapping the wcroot and
> + local_relpath, which are almost always used within the transaction.
> + This also means if we later want to implement some wc_db-specific txn
> + handling, we have a convenient place to do it.
> + */
> +/* A callback which supplies WCROOTs and LOCAL_RELPATHs. */
> +typedef svn_error_t *(*db_txn_callback_t)(void *baton,
> + svn_wc__db_wcroot_t *wcroot,
> + const char *local_relpath,
> + apr_pool_t *scratch_pool);
Why is this here? Why doesn't this code use svn_wc__db_txn_callback_t?
(it does for a param, but that's it...)
> +/* Run CB_FUNC in a SQLite transaction with CB_BATON, using WCROOT and
> + LOCAL_RELPATH. If callbacks require additional information, they may
> + provide it using CB_BATON. */
> +svn_error_t *
> +svn_wc__db_with_txn(svn_wc__db_wcroot_t *wcroot,
The docstring is superfluous, since it is already doc'd in the .h file.
Received on 2011-05-07 07:15:48 CEST