On Thu, Nov 11, 2010 at 1:27 PM, <danielsh_at_apache.org> wrote:
> Author: danielsh
> Date: Thu Nov 11 19:27:43 2010
> New Revision: 1034060
>
> URL: http://svn.apache.org/viewvc?rev=1034060&view=rev
> Log:
> Remove a couple of one-caller helper functions that got in my way.
>
> * subversion/libsvn_fs_fs/err.h,
> subversion/libsvn_fs_fs/err.c:
> (svn_fs_fs__err_dangling_id, svn_fs_fs__err_corrupt_lockfile):
> Remove.
> (the files themselves):
> Remove, since they became empty.
Need to remove the places that err.h is included (I see fs_fs.c and
lock.c as being likely candidates).
-Hyrum
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (err_dangling_id): Moved from svn_fs_fs__err_dangling_id().
> (get_node_revision_body): Track rename.
>
> * subversion/libsvn_fs_fs/lock.c
> (err_corrupt_lockfile): Moved from svn_fs_fs__err_corrupt_lockfile().
> (read_digest_file): Track rename.
>
> Removed:
> subversion/trunk/subversion/libsvn_fs_fs/err.c
> subversion/trunk/subversion/libsvn_fs_fs/err.h
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> subversion/trunk/subversion/libsvn_fs_fs/lock.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=1034060&r1=1034059&r2=1034060&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Nov 11 19:27:43 2010
> @@ -2152,6 +2152,16 @@ read_rep_offsets(representation_t **rep_
> return SVN_NO_ERROR;
> }
>
> +static svn_error_t *
> +err_dangling_id(svn_fs_t *fs, const svn_fs_id_t *id)
> +{
> + svn_string_t *id_str = svn_fs_fs__id_unparse(id, fs->pool);
> + return svn_error_createf
> + (SVN_ERR_FS_ID_NOT_FOUND, 0,
> + _("Reference to non-existent node '%s' in filesystem '%s'"),
> + id_str->data, fs->path);
> +}
> +
> /* Get the node-revision for the node ID in FS.
> Set *NODEREV_P to the new node-revision structure, allocated in POOL.
> See svn_fs_fs__get_node_revision, which wraps this and adds another
> @@ -2185,7 +2195,7 @@ get_node_revision_body(node_revision_t *
> if (APR_STATUS_IS_ENOENT(err->apr_err))
> {
> svn_error_clear(err);
> - return svn_fs_fs__err_dangling_id(fs, id);
> + return svn_error_return(err_dangling_id(fs, id));
> }
>
> return svn_error_return(err);
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/lock.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/lock.c?rev=1034060&r1=1034059&r2=1034060&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/lock.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/lock.c Thu Nov 11 19:27:43 2010
> @@ -108,6 +108,17 @@ hash_fetch(apr_hash_t *hash,
> }
>
>
> +/* SVN_ERR_FS_CORRUPT: the lockfile for PATH in FS is corrupt. */
> +static svn_error_t *
> +err_corrupt_lockfile(svn_fs_t *fs, const char *path)
> +{
> + return
> + svn_error_createf(
> + SVN_ERR_FS_CORRUPT, 0,
> + _("Corrupt lockfile for path '%s' in filesystem '%s'"),
> + path, fs->path);
> +}
> +
>
> /*** Digest file handling functions. ***/
>
> @@ -275,17 +286,17 @@ read_digest_file(apr_hash_t **children_p
> lock->path = path;
>
> if (! ((lock->token = hash_fetch(hash, TOKEN_KEY, pool))))
> - return svn_fs_fs__err_corrupt_lockfile(fs, path);
> + return svn_error_return(err_corrupt_lockfile(fs, path));
>
> if (! ((lock->owner = hash_fetch(hash, OWNER_KEY, pool))))
> - return svn_fs_fs__err_corrupt_lockfile(fs, path);
> + return svn_error_return(err_corrupt_lockfile(fs, path));
>
> if (! ((val = hash_fetch(hash, IS_DAV_COMMENT_KEY, pool))))
> - return svn_fs_fs__err_corrupt_lockfile(fs, path);
> + return svn_error_return(err_corrupt_lockfile(fs, path));
> lock->is_dav_comment = (val[0] == '1');
>
> if (! ((val = hash_fetch(hash, CREATION_DATE_KEY, pool))))
> - return svn_fs_fs__err_corrupt_lockfile(fs, path);
> + return svn_error_return(err_corrupt_lockfile(fs, path));
> SVN_ERR(svn_time_from_cstring(&(lock->creation_date), val, pool));
>
> if ((val = hash_fetch(hash, EXPIRATION_DATE_KEY, pool)))
>
>
>
Received on 2010-11-11 20:47:57 CET