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

Re: svn commit: r1438270 - in /subversion/trunk/subversion/libsvn_client: merge.c repos_diff.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 25 Jan 2013 10:37:21 +0000

rhuijben_at_apache.org writes:

> Author: rhuijben
> Date: Thu Jan 24 23:52:07 2013
> New Revision: 1438270

> +static svn_error_t *
> +diff_state_handle(svn_boolean_t tree_conflicted,
> + svn_wc_notify_state_t *state,
> + svn_wc_notify_state_t *prop_state,
> + const char *relpath,
> + svn_kind_t kind,
> + svn_boolean_t before_operation,
> + svn_boolean_t for_add,
> + svn_boolean_t for_delete,
> + void *state_baton,
> + apr_pool_t *scratch_pool)
> +{
> + struct edit_baton *eb = state_baton;
> + svn_wc_notify_action_t action = svn_wc_notify_skip;

That is the default value:

> +
> + if (! eb->notify_func)
> + return SVN_NO_ERROR;
> +
> + /* This code is copy & pasted from different functions in this file.
> + It is only used from the merge api, and should really be integrated
> + there.
> + */
> +
> + if (for_delete)
> + {
> + const char *deleted_path;
> + deleted_path_notify_t *dpn;
> +
> + if (before_operation && !tree_conflicted)
> + return SVN_NO_ERROR;
> +
> + deleted_path = apr_pstrdup(eb->pool, relpath);
> + dpn = apr_pcalloc(eb->pool, sizeof(*dpn));
> +
> + if (!tree_conflicted
> + && state
> + && (*state != svn_wc_notify_state_missing)
> + && (*state != svn_wc_notify_state_obstructed))
> + {
> + action = svn_wc_notify_update_delete;
> + }
> +
> + dpn->kind = (kind == svn_kind_dir) ? svn_node_dir : svn_node_file;
> + dpn->action = tree_conflicted ? svn_wc_notify_tree_conflict : action;
> + dpn->state = state ? *state : svn_wc_notify_state_inapplicable;
> + dpn->tree_conflicted = tree_conflicted;
> + apr_hash_set(eb->deleted_paths, deleted_path, APR_HASH_KEY_STRING, dpn);
> +
> + return SVN_NO_ERROR;
> + }
> + else if (kind == svn_kind_file)
> + {
> + deleted_path_notify_t *dpn;
> + svn_wc_notify_t *notify;
> + svn_wc_notify_action_t action;

and this one shadows that default.

../src/subversion/libsvn_client/repos_diff.c: In function 'diff_state_handle':
../src/subversion/libsvn_client/repos_diff.c:1390:30: warning: declaration of 'action' shadows a previous local [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1349:26: warning: shadowed declaration is here [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1391:23: warning: declaration of 'kind' shadows a parameter [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1341:30: warning: shadowed declaration is here [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1446:30: warning: declaration of 'action' shadows a previous local [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1349:26: warning: shadowed declaration is here [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1447:23: warning: declaration of 'kind' shadows a parameter [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1341:30: warning: shadowed declaration is here [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1489:28: warning: comparison between 'svn_node_kind_t' and 'enum svn_kind_t' [-Wenum-compare]
../src/subversion/libsvn_client/repos_diff.c:1497:30: warning: declaration of 'action' shadows a previous local [-Wshadow]
../src/subversion/libsvn_client/repos_diff.c:1349:26: warning: shadowed declaration is here [-Wshadow]

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-01-25 11:38:03 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.