You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/05/26 20:32:49 UTC

svn commit: r948525 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/patch.c libsvn_client/status.c libsvn_wc/status.c

Author: rhuijben
Date: Wed May 26 18:32:49 2010
New Revision: 948525

URL: http://svn.apache.org/viewvc?rev=948525&view=rev
Log:
Remove the get_excluded support from the svn status walker that was introduced
in r888508 to fix issues in 'svnversion'. An optimized revision walker that
doesn't use the status walker was written later, removing the only valid user
of get_excluded true.

* subversion/include/svn_wc.h
  (svn_wc_walk_status): Remove get_excluded argument.

* subversion/libsvn_client/patch.c
  (check_dir_empty): Update caller. This caller should have never passed
    true for get_excluded, as this breaks deleting a directory with
    not_present nodes.

* subversion/libsvn_client/status.c
  (svn_client_status5): Update caller.

* subversion/libsvn_wc/status.c
  (get_dir_status): Update prototype.
  (handle_dir_entry): Remove argument.
  (get_dir_status): Remove argument and just use hidden unconditionally.
  (handle_statii): Update caller.
  (close_directory): Update caller.
  (close_edit): Update caller.
  (svn_wc_walk_status): Remove argument.

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_client/patch.c
    subversion/trunk/subversion/libsvn_client/status.c
    subversion/trunk/subversion/libsvn_wc/status.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=948525&r1=948524&r2=948525&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Wed May 26 18:32:49 2010
@@ -3988,9 +3988,6 @@ typedef void (*svn_wc_status_func_t)(voi
  * If @a no_ignore is set, statuses that would typically be ignored
  * will instead be reported.
  *
- * If @a get_excluded is true, statuses for the roots of excluded subtrees
- * are reported.  Otherwise excluded subtrees are ignored.
- *
  * @a ignore_patterns is an array of file patterns matching
  * unversioned files to ignore for the purposes of status reporting,
  * or @c NULL if the default set of ignorable file patterns should be used.
@@ -4012,7 +4009,6 @@ svn_wc_walk_status(svn_wc_context_t *wc_
                    svn_depth_t depth,
                    svn_boolean_t get_all,
                    svn_boolean_t no_ignore,
-                   svn_boolean_t get_excluded,
                    const apr_array_header_t *ignore_patterns,
                    svn_wc_status_func4_t status_func,
                    void *status_baton,

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=948525&r1=948524&r2=948525&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Wed May 26 18:32:49 2010
@@ -1526,7 +1526,7 @@ check_dir_empty(svn_boolean_t *empty, co
   btn.parent_path = local_abspath;
   btn.result_pool = scratch_pool;
   SVN_ERR(svn_wc_walk_status(wc_ctx, local_abspath, svn_depth_immediates,
-                             TRUE, TRUE, TRUE, NULL, find_existing_children,
+                             TRUE, TRUE, NULL, find_existing_children,
                              &btn, NULL, NULL, NULL, NULL, scratch_pool));
   *empty = TRUE;
 

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=948525&r1=948524&r2=948525&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Wed May 26 18:32:49 2010
@@ -480,7 +480,7 @@ svn_client_status5(svn_revnum_t *result_
   else
     {
       err = svn_wc_walk_status(ctx->wc_ctx, target_abspath,
-                               depth, get_all, no_ignore, FALSE, ignores,
+                               depth, get_all, no_ignore, ignores,
                                tweak_status, &sb,
                                ignore_externals ? NULL
                                                 : svn_cl__store_externals,

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=948525&r1=948524&r2=948525&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Wed May 26 18:32:49 2010
@@ -939,7 +939,6 @@ get_dir_status(const struct walk_status_
                svn_boolean_t get_all,
                svn_boolean_t no_ignore,
                svn_boolean_t skip_this_dir,
-               svn_boolean_t get_excluded,
                svn_wc_status_func4_t status_func,
                void *status_baton,
                svn_cancel_func_t cancel_func,
@@ -963,7 +962,6 @@ handle_dir_entry(const struct walk_statu
                  svn_depth_t depth,
                  svn_boolean_t get_all,
                  svn_boolean_t no_ignore,
-                 svn_boolean_t get_excluded,
                  svn_wc_status_func4_t status_func,
                  void *status_baton,
                  svn_cancel_func_t cancel_func,
@@ -986,7 +984,7 @@ handle_dir_entry(const struct walk_statu
         {
           SVN_ERR(get_dir_status(wb, local_abspath, dir_repos_root_url,
                                  dir_repos_relpath, NULL, ignores, depth,
-                                 get_all, no_ignore, FALSE, get_excluded,
+                                 get_all, no_ignore, FALSE,
                                  status_func, status_baton, cancel_func,
                                  cancel_baton,
                                  pool));
@@ -1080,9 +1078,6 @@ handle_externals(const struct walk_statu
    status will not be reported.  However, upon recursing, all subdirs
    *will* be reported, regardless of this parameter's value.
 
-   If GET_EXCLUDED is TRUE, then statuses for the roots of excluded
-   subtrees are reported, otherwise they are ignored.
-
    Other arguments are the same as those passed to
    svn_wc_get_status_editor5().  */
 static svn_error_t *
@@ -1096,7 +1091,6 @@ get_dir_status(const struct walk_status_
                svn_boolean_t get_all,
                svn_boolean_t no_ignore,
                svn_boolean_t skip_this_dir,
-               svn_boolean_t get_excluded,
                svn_wc_status_func4_t status_func,
                void *status_baton,
                svn_cancel_func_t cancel_func,
@@ -1253,7 +1247,7 @@ get_dir_status(const struct walk_status_
           SVN_ERR(svn_wc__db_node_hidden(&hidden, wb->db, node_abspath,
                                          iterpool));
 
-          if (!hidden || get_excluded)
+          if (!hidden)
             {
               err = svn_wc__get_entry(&entry, wb->db, node_abspath, FALSE,
                                       svn_node_unknown, FALSE,
@@ -1303,7 +1297,7 @@ get_dir_status(const struct walk_status_
                                                            ? depth
                                                            : svn_depth_empty,
                                        get_all,
-                                       no_ignore, get_excluded,
+                                       no_ignore,
                                        status_func, status_baton,
                                        cancel_func, cancel_baton, iterpool));
               continue;
@@ -1659,8 +1653,8 @@ make_dir_baton(void **dir_baton,
                              status_in_parent->repos_relpath,
                              NULL, ignores, d->depth == svn_depth_files ?
                              svn_depth_files : svn_depth_immediates,
-                             TRUE, TRUE, TRUE, FALSE, hash_stash, d->statii,
-                             NULL, NULL, pool));
+                             TRUE, TRUE, TRUE, hash_stash, d->statii, NULL,
+                             NULL, pool));
 
       /* If we found a depth here, it should govern. */
       this_dir_status = apr_hash_get(d->statii, d->local_abspath,
@@ -1845,7 +1839,7 @@ handle_statii(struct edit_baton *eb,
           SVN_ERR(get_dir_status(&eb->wb,
                                  local_abspath, dir_repos_root_url,
                                  dir_repos_relpath, NULL, ignores, depth,
-                                 eb->get_all, eb->no_ignore, TRUE, FALSE,
+                                 eb->get_all, eb->no_ignore, TRUE,
                                  status_func, status_baton, eb->cancel_func,
                                  eb->cancel_baton, subpool));
         }
@@ -2110,7 +2104,6 @@ close_directory(void *dir_baton,
                                          NULL, NULL, NULL, eb->ignores, 
                                          eb->default_depth,
                                          eb->get_all, eb->no_ignore, TRUE,
-                                         FALSE,
                                          eb->status_func, eb->status_baton,
                                          eb->cancel_func, eb->cancel_baton,
                                          pool));
@@ -2300,7 +2293,6 @@ close_edit(void *edit_baton,
                              eb->default_depth,
                              eb->get_all,
                              eb->no_ignore,
-                             FALSE,
                              eb->ignores,
                              eb->status_func,
                              eb->status_baton,
@@ -2421,7 +2413,6 @@ svn_wc_walk_status(svn_wc_context_t *wc_
                    svn_depth_t depth,
                    svn_boolean_t get_all,
                    svn_boolean_t no_ignore,
-                   svn_boolean_t get_excluded,
                    const apr_array_header_t *ignore_patterns,
                    svn_wc_status_func4_t status_func,
                    void *status_baton,
@@ -2467,7 +2458,6 @@ svn_wc_walk_status(svn_wc_context_t *wc_
                              get_all,
                              TRUE,
                              TRUE,
-                             get_excluded,
                              status_func,
                              status_baton,
                              cancel_func,
@@ -2486,7 +2476,6 @@ svn_wc_walk_status(svn_wc_context_t *wc_
                              get_all,
                              no_ignore,
                              FALSE,
-                             get_excluded,
                              status_func,
                              status_baton,
                              cancel_func,
@@ -2505,7 +2494,6 @@ svn_wc_walk_status(svn_wc_context_t *wc_
                              get_all,
                              no_ignore,
                              TRUE,
-                             get_excluded,
                              status_func,
                              status_baton,
                              cancel_func,



Re: svn commit: r948525 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_client/patch.c libsvn_client/status.c libsvn_wc/status.c

Posted by Greg Stein <gs...@gmail.com>.
On Wed, May 26, 2010 at 14:32,  <rh...@apache.org> wrote:
> Author: rhuijben
> Date: Wed May 26 18:32:49 2010
> New Revision: 948525
>
> URL: http://svn.apache.org/viewvc?rev=948525&view=rev
> Log:
> Remove the get_excluded support from the svn status walker that was introduced
> in r888508 to fix issues in 'svnversion'. An optimized revision walker that
> doesn't use the status walker was written later, removing the only valid user
> of get_excluded true.
>
> * subversion/include/svn_wc.h
>  (svn_wc_walk_status): Remove get_excluded argument.
>
> * subversion/libsvn_client/patch.c
>  (check_dir_empty): Update caller. This caller should have never passed
>    true for get_excluded, as this breaks deleting a directory with
>    not_present nodes.

This is an argument for creating a regression test for this situation.

>...

Cheers,
-g