You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/05/03 17:23:52 UTC
svn commit: r940482 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/info.c libsvn_wc/node.c
Author: cmpilato
Date: Mon May 3 15:23:51 2010
New Revision: 940482
URL: http://svn.apache.org/viewvc?rev=940482&view=rev
Log:
Continue purging svn_wc_entry_t dependency from libsvn_client.
* subversion/include/private/svn_wc_private.h,
* subversion/libsvn_wc/node.c
(svn_wc__node_get_translated_size): New.
* subversion/libsvn_client/info.c
(build_info_for_entry): Use svn_wc__node_get_translated_size().
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=940482&r1=940481&r2=940482&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Mon May 3 15:23:51 2010
@@ -349,6 +349,19 @@ svn_wc__node_get_base_checksum(const svn
apr_pool_t *scratch_pool);
/**
+ * Set @a *translated_size to the recorded size (in bytes) of the
+ * pristine text -- after translation -- associated with @a
+ * local_abspath. If @a local_abspath isn't a file in the working
+ * copy, set @a *translated_size to SVN_INVALID_FILESIZE. Use @a
+ * scratch_pool for temporary allocations.
+ */
+svn_error_t *
+svn_wc__node_get_translated_size(svn_filesize_t *translated_size,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool);
+
+/**
* Set @a *url to the corresponding url for @a local_abspath, using @a wc_ctx.
* If the node is added, return the url it will have in the repository.
*
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=940482&r1=940481&r2=940482&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Mon May 3 15:23:51 2010
@@ -165,11 +165,12 @@ build_info_for_entry(svn_info_t **info,
tmpinfo->size = SVN_INFO_SIZE_UNKNOWN;
tmpinfo->size64 = SVN_INVALID_FILESIZE;
- if (((apr_size_t)entry->working_size) == entry->working_size)
- tmpinfo->working_size = (apr_size_t)entry->working_size;
+ SVN_ERR(svn_wc__node_get_translated_size(&tmpinfo->working_size64, wc_ctx,
+ local_abspath, pool));
+ if (((apr_size_t)tmpinfo->working_size64) == tmpinfo->working_size64)
+ tmpinfo->working_size = (apr_size_t)tmpinfo->working_size64;
else /* >= 4GB */
tmpinfo->working_size = SVN_INFO_SIZE_UNKNOWN;
- tmpinfo->working_size64 = entry->working_size;
/* lock stuff */
SVN_ERR(svn_wc__node_get_lock_info(&lock_token, &lock_owner,
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=940482&r1=940481&r2=940482&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Mon May 3 15:23:51 2010
@@ -300,6 +300,23 @@ svn_wc__node_get_base_checksum(const svn
}
svn_error_t *
+svn_wc__node_get_translated_size(svn_filesize_t *translated_size,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_return(svn_wc__db_read_info(NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ translated_size,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ wc_ctx->db, local_abspath,
+ scratch_pool, scratch_pool));
+}
+
+svn_error_t *
svn_wc__internal_node_get_url(const char **url,
svn_wc__db_t *db,
const char *local_abspath,