[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1056468 - in /subversion/trunk: contrib/hook-scripts/remove-zombie-locks.py subversion/include/svn_fs.h subversion/libsvn_fs_base/lock.c

From: Blair Zajac <blair_at_orcaware.com>
Date: Fri, 07 Jan 2011 11:55:45 -0800

On 01/07/2011 11:33 AM, cmpilato_at_apache.org wrote:
> Author: cmpilato
> Date: Fri Jan 7 19:33:28 2011
> New Revision: 1056468
>
> URL: http://svn.apache.org/viewvc?rev=1056468&view=rev
> Log:
> Clean up an old bit of API nastiness which prevented implementations
> of the svn_fs_get_locks_callback_t callback from performing additional
> FS operations in BDB-backed repositories. Having svn_fs_get_locks2()
> already revved for 1.7 makes this a good time to fix this old bug.

> + SVN_ERR(svn_io_open_uniquely_named(&(args.spool_file), NULL, NULL, NULL,
> + NULL, svn_io_file_del_on_close,
> + pool, pool));
> + SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_get_locks,&args, FALSE, pool));
> +
> + /* Rewind the spool file, then re-read it, calling GET_LOCKS_FUNC(). */
> + svn_io_file_seek(args.spool_file, APR_SET,&offset, pool);

Need to handle the error here?

> + /* Read the extra newline that follows the skel. */
> + len = 1;
> + SVN_ERR(svn_stream_read(stream,&c,&len));
> + if (c != '\n')
> + return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +
> + /* Parse the skel into a lock, and notify the caller. */
> + lock_skel = svn_skel__parse(skel_buf, skel_len, iterpool);
> + SVN_ERR(svn_fs_base__parse_lock_skel(&lock, lock_skel, iterpool));
> + get_locks_func(get_locks_baton, lock, iterpool);

And here too, since svn_fs_get_locks_callback_t has an svn_error_t *
return type.

Blair
Received on 2011-01-07 20:56:23 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.