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

Re: svn commit: r31941 - branches/issue-2843-dev/subversion/libsvn_wc

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 01 Jul 2008 06:50:54 -0700

firemeteor_at_tigris.org wrote:
> Author: firemeteor
> Date: Tue Jul 1 06:31:16 2008
> New Revision: 31941
>
> Log:
> On the issue-2843-dev branch.
>
> * subversion/libsvn_wc/adm_ops.c
> (svn_wc_remove_from_revision_control): Fix a problem introduced in merge.
>
> * subversion/libsvn_wc/entries.c
> (read_entries): Verify depth value as suggested by Karl.
>
> Modified:
> branches/issue-2843-dev/subversion/libsvn_wc/adm_ops.c
> branches/issue-2843-dev/subversion/libsvn_wc/entries.c
>
> Modified: branches/issue-2843-dev/subversion/libsvn_wc/adm_ops.c
> URL: http://svn.collab.net/viewvc/svn/branches/issue-2843-dev/subversion/libsvn_wc/adm_ops.c?pathrev=31941&r1=31940&r2=31941
> ==============================================================================
> --- branches/issue-2843-dev/subversion/libsvn_wc/adm_ops.c Tue Jul 1 02:43:13 2008 (r31940)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/adm_ops.c Tue Jul 1 06:31:16 2008 (r31941)
> @@ -2569,7 +2569,7 @@ svn_wc_remove_from_revision_control(svn_
> the entry in the parent directory should be preserved
> for bookkeeping purpose. This only happens when the
> function is called by svn_wc_crop_tree(). */
> - dir_entry = apr_hash_get(entries, base_name,
> + dir_entry = apr_hash_get(parent_entries, base_name,
> APR_HASH_KEY_STRING);
> if (dir_entry->depth != svn_depth_exclude)
> {
>
> Modified: branches/issue-2843-dev/subversion/libsvn_wc/entries.c
> URL: http://svn.collab.net/viewvc/svn/branches/issue-2843-dev/subversion/libsvn_wc/entries.c?pathrev=31941&r1=31940&r2=31941
> ==============================================================================
> --- branches/issue-2843-dev/subversion/libsvn_wc/entries.c Tue Jul 1 02:43:13 2008 (r31940)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/entries.c Tue Jul 1 06:31:16 2008 (r31941)
> @@ -492,9 +492,28 @@ read_entry(svn_wc_entry_t **new_entry,
> const char *result;
> SVN_ERR(read_val(&result, buf, end));
> if (result)
> - entry->depth = svn_depth_from_word(result);
> + {
> + svn_boolean_t invalid;
> + svn_boolean_t is_this_dir;
> +
> + entry->depth = svn_depth_from_word(result);
> +
> + /* Verify the depth value:
> + THIS_DIR should not have an excluded value and SUB_DIR should only
> + have excluded value. Remember that infinity value is not stored and
> + should not show up here. Otherwise, something bad may have
> + happened. However, infinity value itself will always be okay. */
> + is_this_dir = !name;
> + invalid = is_this_dir ^ (entry->depth != svn_depth_exclude);

I'm pretty sure as a style issue we don't use bitwise operations in boolean
operations here. If you could rewrite that in normal !, && and || that would be
clearer.

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-01 15:51:18 CEST

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.