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

Re: svn commit: r37727 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 14 May 2009 21:10:52 +0200

On Thu, May 14, 2009 at 19:11, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/adm_ops.c        Thu May 14 10:11:52 2009        (r37727)
>...
>       /* Ignore the "this dir" entry. */
> -      if (! strcmp(name, SVN_WC_ENTRY_THIS_DIR))
> +      if (! strcmp(child_basename, SVN_WC_ENTRY_THIS_DIR))
>         continue;

No need. You're iterating over *children*. Remember, this is a "real"
API. You don't have parents mixed in with children. ;-)

>...
>       /* If a file, or deleted, excluded or absent dir, then tweak the
>          entry but don't recurse. */
> -      if ((current_entry->kind == svn_node_file)
> -          || (current_entry->deleted || current_entry->absent
> -              || current_entry->depth == svn_depth_exclude))
> +      if (kind == svn_wc__db_kind_file
> +            || status == svn_wc__db_status_not_present
> +            || status == svn_wc__db_status_absent
> +            || child_depth == svn_depth_exclude)

I don't think this entirely matches. Consider that in "Entry Land",
you could have DELETED and schedule-add. With wc_db, the status would
be "added" rather than "not present".

And regardless, the comment needs to be updated.

>...
> @@ -184,19 +188,18 @@ tweak_entries(svn_wc_adm_access_t *dir_a
>           if (remove_missing_dirs
>               && svn_wc__adm_missing(dir_access, child_path))
>             {
> -              if (current_entry->schedule != svn_wc_schedule_add
> +              if (status == svn_wc__db_status_added
>                   && !excluded)

Do you also need to check for an obstructed add here?

>                 {
> -                  SVN_ERR(svn_wc__entry_remove(db, child_abspath, subpool));
> -                  apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
> +                  SVN_ERR(svn_wc__entry_remove(db, child_abspath, iterpool));
>
>                   if (notify_func)
>                     {
>                       notify = svn_wc_create_notify(child_path,
>                                                     svn_wc_notify_delete,
> -                                                    subpool);
> -                      notify->kind = current_entry->kind;
> -                      (* notify_func)(notify_baton, notify, subpool);
> +                                                    iterpool);
> +                      notify->kind = kind;
> +                      (* notify_func)(notify_baton, notify, iterpool);

Whoops! Mismatch of kind types here.

>...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2261811
Received on 2009-05-14 21:11:10 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.