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