You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/17 20:31:05 UTC
svn commit: r1094183 - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_client/info.c libsvn_wc/node.c
Author: rhuijben
Date: Sun Apr 17 18:31:04 2011
New Revision: 1094183
URL: http://svn.apache.org/viewvc?rev=1094183&view=rev
Log:
Rename a few badly named svn_wc__node_*() functions.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_get_base_checksum): Rename to ...
(svn_wc__node_get_checksum): ... this, because it doesn't look in the BASE
tree.
(svn_wc__node_get_translated_size): Rename to ...
(svn_wc__node_get_recorded_info): ... this and add a recorded_mod_time
argument, as these arguments make more sense as a pair.
(svn_wc__node_get_info_bits): Rename to ...
(svn_wc__node_get_conflict_info): ... this, and remove the completely
unrelated text_time argument which can now be retrieved in a different
way. And hey, now this new name makes sense.
* subversion/libsvn_client/info.c
(build_info_for_entry): Update caller.
* subversion/libsvn_wc/node.c
(svn_wc__node_get_base_checksum): Rename to ...
(svn_wc__node_get_checksum): ... this, because it doesn't look in the BASE
tree.
(svn_wc__node_get_translated_size): Rename to ...
(svn_wc__node_get_recorded_info): ... this and add a recorded_mod_time
argument, as these arguments make more sense as a pair.
(svn_wc__node_get_info_bits): Rename to ...
(svn_wc__node_get_conflict_info): ... this, and remove the completely
unrelated text_time argument which can now be retrieved in a different
way. And hey, now this new name makes sense.
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=1094183&r1=1094182&r2=1094183&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sun Apr 17 18:31:04 2011
@@ -287,24 +287,32 @@ svn_wc__node_get_changelist(const char *
* result_pool and use @a scratch_pool for temporary allocations.
*/
svn_error_t *
-svn_wc__node_get_base_checksum(const svn_checksum_t **checksum,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
+svn_wc__node_get_checksum(const svn_checksum_t **checksum,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/**
- * Set @a *translated_size to the recorded size (in bytes) of the
+ * Set @a *recorded_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.
+ * local_abspath and @a *recorded_mod_time to the recorded last
+ *
+ * modification time. (@a recorded_size and @a recorded_mod_time may be NULL,
+ * if the caller is not interested in the result.
+ *
+ * If @a local_abspath isn't a versioned file in the working copy (but is a
+ * valid node) or when no information is recorded, set @a *translated_size
+ * to SVN_INVALID_FILESIZE and @a *recorded_last_mod_time to 0.
+ *
+ * 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);
+svn_wc__node_get_recorded_info(svn_filesize_t *recorded_size,
+ apr_time_t *recorded_mod_time,
+ 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.
@@ -619,22 +627,23 @@ svn_wc__node_check_conflicts(svn_boolean
/**
* 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. All output arguments can be NULL to indicate that the
+ * some values from WC-NG, and puts the needed bits into the output parameters,
+ * allocated in @a result_pool.
+ *
+ * All output arguments can be NULL to indicate that the
* caller is not interested in the specific result.
*
* @a local_abspath and @a wc_ctx are what you think they are.
*/
svn_error_t *
-svn_wc__node_get_info_bits(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);
+svn_wc__node_get_conflict_info(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);
/**
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=1094183&r1=1094182&r2=1094183&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Sun Apr 17 18:31:04 2011
@@ -196,8 +196,8 @@ build_info_for_entry(svn_info_t **info,
local_abspath,
result_pool, scratch_pool));
- SVN_ERR(svn_wc__node_get_base_checksum(&checksum, wc_ctx, local_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__node_get_checksum(&checksum, wc_ctx, local_abspath,
+ scratch_pool, scratch_pool));
tmpinfo->checksum = svn_checksum_to_cstring(checksum, result_pool);
}
@@ -222,22 +222,21 @@ build_info_for_entry(svn_info_t **info,
SVN_ERR(svn_wc_get_wc_root(&tmpinfo->wcroot_abspath, wc_ctx,
local_abspath, result_pool, scratch_pool));
- /* Some random stuffs we don't have wc-ng apis for yet */
- SVN_ERR(svn_wc__node_get_info_bits(&tmpinfo->text_time,
- &tmpinfo->conflict_old,
- &tmpinfo->conflict_new,
- &tmpinfo->conflict_wrk,
- &tmpinfo->prejfile,
- wc_ctx, local_abspath,
- result_pool, scratch_pool));
+ SVN_ERR(svn_wc__node_get_conflict_info(&tmpinfo->conflict_old,
+ &tmpinfo->conflict_new,
+ &tmpinfo->conflict_wrk,
+ &tmpinfo->prejfile,
+ wc_ctx, local_abspath,
+ result_pool, scratch_pool));
/* Some defaults */
tmpinfo->has_wc_info = TRUE;
tmpinfo->size = SVN_INFO_SIZE_UNKNOWN;
tmpinfo->size64 = SVN_INVALID_FILESIZE;
- SVN_ERR(svn_wc__node_get_translated_size(&tmpinfo->working_size64, wc_ctx,
- local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__node_get_recorded_info(&tmpinfo->working_size64,
+ &tmpinfo->text_time,
+ wc_ctx, local_abspath, scratch_pool));
if (((apr_size_t)tmpinfo->working_size64) == tmpinfo->working_size64)
tmpinfo->working_size = (apr_size_t)tmpinfo->working_size64;
else /* >= 4GB */
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1094183&r1=1094182&r2=1094183&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sun Apr 17 18:31:04 2011
@@ -347,11 +347,11 @@ svn_wc__node_get_changelist(const char *
}
svn_error_t *
-svn_wc__node_get_base_checksum(const svn_checksum_t **checksum,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_wc__node_get_checksum(const svn_checksum_t **checksum,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
return svn_error_return(svn_wc__db_read_info(NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
@@ -365,18 +365,20 @@ 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)
+svn_wc__node_get_recorded_info(svn_filesize_t *recorded_size,
+ apr_time_t *recorded_mod_time,
+ 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,
NULL, NULL, NULL, NULL,
- NULL, translated_size,
- NULL, NULL, NULL,
+ NULL, recorded_size,
+ recorded_mod_time,
NULL, NULL, NULL,
+ NULL, NULL,
NULL, NULL, NULL,
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
@@ -1312,21 +1314,20 @@ svn_wc__node_get_schedule(svn_wc_schedul
}
svn_error_t *
-svn_wc__node_get_info_bits(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)
+svn_wc__node_get_conflict_info(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)
{
svn_boolean_t conflicted;
SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, text_time, NULL, &conflicted,
+ NULL, NULL, NULL, NULL, &conflicted,
NULL, NULL, NULL, NULL, NULL, NULL,
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));