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

Re: svn commit: r1092530 - in /subversion/trunk/subversion/libsvn_wc: status.c update_editor.c wc.h

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 14 Apr 2011 18:24:56 -0400

On Thu, Apr 14, 2011 at 18:04, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/status.c Thu Apr 14 22:04:55 2011
> @@ -2370,28 +2370,30 @@ svn_wc_get_status_editor5(const svn_delt
>...
> +svn_wc__internal_walk_status(svn_wc__db_t *db,
> +                             const char *local_abspath,
> +                             svn_depth_t depth,
> +                             svn_boolean_t get_all,
> +                             svn_boolean_t no_ignore,
> +                             svn_boolean_t ignore_text_mods,
> +                             const apr_array_header_t *ignore_patterns,
> +                             svn_wc_status_func4_t status_func,
> +                             void *status_baton,
> +                             svn_wc_external_update_t external_func,
> +                             void *external_baton,
> +                             svn_cancel_func_t cancel_func,
> +                             void *cancel_baton,
> +                             apr_pool_t *scratch_pool)
>  {
> -  svn_node_kind_t kind;
>   struct walk_status_baton wb;
>   const svn_io_dirent2_t *dirent;
>   const char *anchor_abspath, *target_name;
>   svn_boolean_t skip_root;
> +  svn_error_t *err;
> +  svn_wc__db_status_t status;
> +  svn_wc__db_kind_t kind;

status is not used.

>...
> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Apr 14 22:04:55 2011
>...
> @@ -1261,30 +1220,39 @@ modcheck_found_node(const char *local_ab
>  * *ALL_EDITS_ARE_DELETES to true, set it to false otherwise.  LOCAL_ABSPATH
>  * may be a file or a directory. */
>  static svn_error_t *
> -tree_has_local_mods(svn_boolean_t *modified,
> +node_has_local_mods(svn_boolean_t *modified,
>                     svn_boolean_t *all_edits_are_deletes,
>                     svn_wc__db_t *db,
>                     const char *local_abspath,
>                     svn_cancel_func_t cancel_func,
>                     void *cancel_baton,
> -                    apr_pool_t *pool)
> +                    apr_pool_t *scratch_pool)
>  {
> -  modcheck_baton_t modcheck_baton = { NULL, FALSE, TRUE };
> +  modcheck_baton_t modcheck_baton = { NULL, FALSE, FALSE };
> +  svn_error_t *err;
>
>   modcheck_baton.db = db;
>
> -  /* Walk the WC tree to its full depth, looking for any local modifications.
> -   * If it's a "sparse" directory, that's OK: there can be no local mods in
> -   * the pieces that aren't present in the WC. */
> -
> -  SVN_ERR(svn_wc__internal_walk_children(db, local_abspath,
> -                                         FALSE /* show_hidden */,
> -                                         modcheck_found_node, &modcheck_baton,
> -                                         svn_depth_infinity, cancel_func,
> -                                         cancel_baton, pool));
> +  /* Walk the WC tree for status with depth infinity, looking for any local
> +   * modifications. If it's a "sparse" directory, that's OK: there can be
> +   * no local mods in the pieces that aren't present in the WC. */
> +
> +  err = svn_wc__internal_walk_status(db, local_abspath,

How can this work for a file? It looks like walk_status will fail for
non-directory nodes. It calls get_dir_status() which then tries to
read children info and fetch dirents.

>...
> @@ -1596,32 +1564,16 @@ check_tree_conflict(svn_wc_conflict_desc
>
>         /* Check if the update wants to delete or replace a locally
>          * modified node. */
> -        switch (working_kind)
> -          {
> -            case svn_wc__db_kind_file:
> -            case svn_wc__db_kind_symlink:

Seems that something like this needs to stick around.

If not, then note that the 'working_kind' parameter is no longer used.

>...

Cheers,
-g
Received on 2011-04-15 00:25:27 CEST

This is an archived mail posted to the Subversion Dev mailing list.