You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/06/24 15:34:40 UTC
svn commit: r957544 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/info.c libsvn_wc/node.c
Author: hwright
Date: Thu Jun 24 13:34:39 2010
New Revision: 957544
URL: http://svn.apache.org/viewvc?rev=957544&view=rev
Log:
Remove the last use of the svn_wc_entry_t from libsvn_client by adding a
custom node function to fetch the specific bits that info needs. This
function should eventually be removed, as the API support is improved.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_get_info_bits): New.
* subversion/libsvn_wc/node.c
(svn_wc__node_get_info_bits): New.
* subversion/libsvn_client/info.c
(build_info_for_entry): Use the custom function, rather than fetching an
entry and copying the specific bits out of it.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/info.c
subversion/trunk/subversion/libsvn_wc/node.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=957544&r1=957543&r2=957544&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Jun 24 13:34:39 2010
@@ -622,6 +622,25 @@ svn_wc__node_check_conflicts(svn_boolean
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/**
+ * A hack to remove the last entry from libsvn_client. This simply fetches an
+ * entry, and puts the needed bits into the output parameters, allocated in
+ * @a result_pool.
+ *
+ * @a local_abspath and @a wc_ctx are what you think they are.
+ */
+svn_error_t *
+svn_wc__node_get_info_bits(svn_wc_schedule_t *schedule,
+ apr_time_t *text_time,
+ const char **conflict_old,
+ const char **conflict_new,
+ const char **conflict_wrk,
+ const char **prejfile,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/**
* Recursively acquire write locks for @a local_abspath if
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=957544&r1=957543&r2=957544&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Thu Jun 24 13:34:39 2010
@@ -91,15 +91,10 @@ build_info_for_entry(svn_info_t **info,
const char *copyfrom_url;
svn_revnum_t copyfrom_rev;
svn_boolean_t is_copy_target;
- const svn_wc_entry_t *entry;
const char *lock_token, *lock_owner, *lock_comment;
apr_time_t lock_date;
const svn_checksum_t *checksum;
- SVN_ERR(svn_wc__get_entry_versioned(&entry, wc_ctx, local_abspath,
- svn_node_unknown, TRUE, FALSE,
- pool, pool));
-
SVN_ERR(svn_wc_read_kind(&tmpinfo->kind, wc_ctx, local_abspath, TRUE, pool));
SVN_ERR(svn_wc__node_get_url(&tmpinfo->URL, wc_ctx, local_abspath,
pool, pool));
@@ -158,14 +153,16 @@ build_info_for_entry(svn_info_t **info,
if (tmpinfo->depth == svn_depth_unknown)
tmpinfo->depth = svn_depth_infinity;
- /* entry-specific stuff */
+ /* Some random stuffs we don't have wc-ng apis for yet */
+ SVN_ERR(svn_wc__node_get_info_bits(&tmpinfo->schedule, &tmpinfo->text_time,
+ &tmpinfo->conflict_old,
+ &tmpinfo->conflict_new,
+ &tmpinfo->conflict_wrk,
+ &tmpinfo->prejfile,
+ wc_ctx, local_abspath, pool, pool));
+
+ /* Some defaults */
tmpinfo->has_wc_info = TRUE;
- tmpinfo->schedule = entry->schedule;
- tmpinfo->text_time = entry->text_time;
- tmpinfo->conflict_old = entry->conflict_old;
- tmpinfo->conflict_new = entry->conflict_new;
- tmpinfo->conflict_wrk = entry->conflict_wrk;
- tmpinfo->prejfile = entry->prejfile;
tmpinfo->size = SVN_INFO_SIZE_UNKNOWN;
tmpinfo->size64 = SVN_INVALID_FILESIZE;
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=957544&r1=957543&r2=957544&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Jun 24 13:34:39 2010
@@ -1134,3 +1134,31 @@ svn_wc__temp_get_keep_local(svn_boolean_
return SVN_NO_ERROR;
}
+
+svn_error_t *
+svn_wc__node_get_info_bits(svn_wc_schedule_t *schedule,
+ apr_time_t *text_time,
+ const char **conflict_old,
+ const char **conflict_new,
+ const char **conflict_wrk,
+ const char **prejfile,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ const svn_wc_entry_t *entry;
+
+ SVN_ERR(svn_wc__get_entry_versioned(&entry, wc_ctx, local_abspath,
+ svn_node_unknown, TRUE, FALSE,
+ result_pool, scratch_pool));
+
+ *schedule = entry->schedule;
+ *text_time = entry->text_time;
+ *conflict_old = entry->conflict_old;
+ *conflict_new = entry->conflict_new;
+ *conflict_wrk = entry->conflict_wrk;
+ *prejfile = entry->prejfile;
+
+ return SVN_NO_ERROR;
+}