On Wed, Jul 1, 2009 at 20:02, Hyrum K. Wright<hyrum_at_hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/props.c  Wed Jul  1 11:02:00 2009     (r38297)
> @@ -2462,44 +2462,34 @@ svn_wc_props_modified_p(svn_boolean_t *m
>
>
> Â svn_error_t *
> -svn_wc_get_prop_diffs(apr_array_header_t **propchanges,
> - Â Â Â Â Â Â Â Â Â Â Â apr_hash_t **original_props,
> - Â Â Â Â Â Â Â Â Â Â Â const char *path,
> - Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> +svn_wc_get_prop_diffs2(apr_array_header_t **propchanges,
> + Â Â Â Â Â Â Â Â Â Â Â apr_hash_t **original_props,
> + Â Â Â Â Â Â Â Â Â Â Â svn_wc_context_t *wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â const char *local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> - Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> - Â const char *local_abspath;
> Â svn_wc__db_kind_t kind;
> Â apr_hash_t *baseprops, *props;
> - Â const char *entryname;
>
> - Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> - Â SVN_ERR(svn_wc__db_check_node(&kind, db, local_abspath, pool));
> + Â SVN_ERR(svn_wc__db_check_node(&kind, wc_ctx->db, local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
>
> Â if (kind == svn_wc__db_kind_unknown)
> Â Â return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("'%s' is not under version control"),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_local_style(path, pool));
Ugh. I'd just as soon not bother to check this, and let the load_props
throw some error. We're rev'ing the API, so the specific error
returned can just be propagated from load_props, rather than mapped to
PATH_NOT_FOUND.
> -
> - Â if (kind == svn_wc__db_kind_dir)
> - Â Â {
> - Â Â Â entryname = SVN_WC_ENTRY_THIS_DIR;
> - Â Â }
> - Â else
> - Â Â {
> - Â Â Â const char *dirname;
> - Â Â Â svn_dirent_split(path, &dirname, &entryname, pool);
> - Â Â }
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_local_style(local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
>
> Â SVN_ERR(svn_wc__load_props(&baseprops, propchanges ? &props : NULL, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â db, local_abspath, pool, pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â wc_ctx->db, local_abspath, result_pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
Similar to my comment in another revision, I'd hope this throws an
error if the node does not exist.
>...
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2368168
Received on 2009-07-05 20:16:34 CEST