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

Re: svn commit: r34131 - in trunk/subversion: include/private libsvn_fs_base libsvn_fs_fs

From: David Glasser <glasser_at_davidglasser.net>
Date: Mon, 10 Nov 2008 10:01:27 -0800

On Mon, Nov 10, 2008 at 9:00 AM, <rhuijben_at_tigris.org> wrote:
> Author: rhuijben
> Date: Mon Nov 10 09:00:10 2008
> New Revision: 34131
>
> Log:
> Convert repository path in SVN_ERR_FS_ALREADY_EXISTS template to local style.

Wait, really? I thought we try to consistently use '/' for
repository-style paths.

--dave

> * subversion/include/private/svn_fs_util.h
> (SVN_FS__ALREADY_EXISTS): Add pool argument to allow translating repository
> path to local style.
>
> * subversion/libsvn_fs_base/tree.c
> (txn_body_make_dir, txn_body_make_file)
> * subversion/libsvn_fs_fs/tree.c
> (fs_make_dir, fs_make_file): Pass valid pool to SVN_FS__ALREADY_EXISTS.
>
> Modified:
> trunk/subversion/include/private/svn_fs_util.h
> trunk/subversion/libsvn_fs_base/tree.c
> trunk/subversion/libsvn_fs_fs/tree.c
>
> Modified: trunk/subversion/include/private/svn_fs_util.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/private/svn_fs_util.h?pathrev=34131&r1=34130&r2=34131
> ==============================================================================
> --- trunk/subversion/include/private/svn_fs_util.h Mon Nov 10 08:39:54 2008 (r34130)
> +++ trunk/subversion/include/private/svn_fs_util.h Mon Nov 10 09:00:10 2008 (r34131)
> @@ -63,17 +63,18 @@ svn_fs__check_fs(svn_fs_t *fs, svn_boole
>
> /* Build a detailed `file already exists' message for PATH in ROOT.
> ROOT is of type svn_fs_root_t *. */
> -#define SVN_FS__ALREADY_EXISTS(root, path_str) ( \
> +#define SVN_FS__ALREADY_EXISTS(root, path_str, pool) ( \
> root->is_txn_root ? \
> svn_error_createf \
> (SVN_ERR_FS_ALREADY_EXISTS, 0, \
> _("File already exists: filesystem '%s', transaction '%s', path '%s'"), \
> - root->fs->path, root->txn, path_str) \
> + svn_path_local_style(root->fs->path), root->txn, path_str) \
> : \
> svn_error_createf \
> (SVN_ERR_FS_ALREADY_EXISTS, 0, \
> _("File already exists: filesystem '%s', revision %ld, path '%s'"), \
> - root->fs->path, root->rev, path_str) \
> + svn_path_local_style(root->fs->path), root->fs->path, root->rev, \
> + path_str) \
> )
>
> /* ROOT is of type svn_fs_root_t *. */
>
> Modified: trunk/subversion/libsvn_fs_base/tree.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/tree.c?pathrev=34131&r1=34130&r2=34131
> ==============================================================================
> --- trunk/subversion/libsvn_fs_base/tree.c Mon Nov 10 08:39:54 2008 (r34130)
> +++ trunk/subversion/libsvn_fs_base/tree.c Mon Nov 10 09:00:10 2008 (r34131)
> @@ -2895,7 +2895,7 @@ txn_body_make_dir(void *baton,
> /* If there's already a sub-directory by that name, complain. This
> also catches the case of trying to make a subdirectory named `/'. */
> if (parent_path->node)
> - return SVN_FS__ALREADY_EXISTS(root, path);
> + return SVN_FS__ALREADY_EXISTS(root, path, trail->pool);
>
> /* Check to see if some lock is 'reserving' a file-path or dir-path
> at that location, or even some child-path; if so, check that we
> @@ -3341,7 +3341,7 @@ txn_body_make_file(void *baton,
> /* If there's already a file by that name, complain.
> This also catches the case of trying to make a file named `/'. */
> if (parent_path->node)
> - return SVN_FS__ALREADY_EXISTS(root, path);
> + return SVN_FS__ALREADY_EXISTS(root, path, trail->pool);
>
> /* Check to see if some lock is 'reserving' a file-path or dir-path
> at that location, or even some child-path; if so, check that we
>
> Modified: trunk/subversion/libsvn_fs_fs/tree.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_fs/tree.c?pathrev=34131&r1=34130&r2=34131
> ==============================================================================
> --- trunk/subversion/libsvn_fs_fs/tree.c Mon Nov 10 08:39:54 2008 (r34130)
> +++ trunk/subversion/libsvn_fs_fs/tree.c Mon Nov 10 09:00:10 2008 (r34131)
> @@ -1852,7 +1852,7 @@ fs_make_dir(svn_fs_root_t *root,
> /* If there's already a sub-directory by that name, complain. This
> also catches the case of trying to make a subdirectory named `/'. */
> if (parent_path->node)
> - return SVN_FS__ALREADY_EXISTS(root, path);
> + return SVN_FS__ALREADY_EXISTS(root, path, pool);
>
> /* Create the subdirectory. */
> SVN_ERR(make_path_mutable(root, parent_path->parent, path, pool));
> @@ -2194,7 +2194,7 @@ fs_make_file(svn_fs_root_t *root,
> /* If there's already a file by that name, complain.
> This also catches the case of trying to make a file named `/'. */
> if (parent_path->node)
> - return SVN_FS__ALREADY_EXISTS(root, path);
> + return SVN_FS__ALREADY_EXISTS(root, path, pool);
>
> /* Check (non-recursively) to see if path is locked; if so, check
> that we can use it. */
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-10 19:01:52 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.