You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/12/11 22:19:31 UTC
svn commit: r1420415 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: julianfoad
Date: Tue Dec 11 21:19:30 2012
New Revision: 1420415
URL: http://svn.apache.org/viewvc?rev=1420415&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
(svn_wc__db_base_get_props): Re-implement as a wrapper around
svn_wc__db_base_get_info() in order to guarantee consistency and reduce
complexity.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1420415&r1=1420414&r2=1420415&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Dec 11 21:19:30 2012
@@ -2615,43 +2615,24 @@ svn_wc__db_base_get_props(apr_hash_t **p
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_sqlite__stmt_t *stmt;
- svn_boolean_t have_row;
svn_wc__db_status_t presence;
- svn_error_t *err;
-
- SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
- STMT_SELECT_BASE_PROPS, scratch_pool));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (!have_row)
- {
- err = svn_sqlite__reset(stmt);
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, err,
- _("The node '%s' was not found."),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
- }
- presence = svn_sqlite__column_token(stmt, 1, presence_map);
+ SVN_ERR(svn_wc__db_base_get_info(&presence, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, props, NULL,
+ db, local_abspath,
+ result_pool, scratch_pool));
if (presence != svn_wc__db_status_normal
&& presence != svn_wc__db_status_incomplete)
{
- err = svn_sqlite__reset(stmt);
- return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, err,
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
_("The node '%s' has a BASE status that"
" has no properties."),
svn_dirent_local_style(local_abspath,
scratch_pool));
}
- err = svn_sqlite__column_properties(props, stmt, 0, result_pool,
- scratch_pool);
- if (err == NULL && *props == NULL)
- {
- /* an empty skel or NULL indicates no properties */
- *props = apr_hash_make(result_pool);
- }
- return svn_error_compose_create(err, svn_sqlite__reset(stmt));
+ return SVN_NO_ERROR;
}