You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/20 22:31:44 UTC
svn commit: r1533970 - in /subversion/trunk/subversion:
libsvn_fs_x/changes.c libsvn_fs_x/index.c libsvn_fs_x/noderevs.c
svnserve/serve.c
Author: stefan2
Date: Sun Oct 20 20:31:44 2013
New Revision: 1533970
URL: http://svn.apache.org/r1533970
Log:
Localized strings must not contain preprocessor macros.
* subversion/libsvn_fs_x/noderevs.c
(svn_fs_x__noderevs_get,
read_reps): use the double-escape trick for localized strings
as we already do in other places
* subversion/libsvn_fs_x/changes.c
(svn_fs_x__changes_get_list): ditto
* subversion/svnserve/serve.c
(log_cmd): ditto
* subversion/libsvn_fs_x/index.c
(l2p_page_get_offset): ditto; had to provide a pool
(l2p_page_access_func,
l2p_index_lookup): update callers
Found by: Mattias EngdegÄrd <ma...@bredband.net>
Modified:
subversion/trunk/subversion/libsvn_fs_x/changes.c
subversion/trunk/subversion/libsvn_fs_x/index.c
subversion/trunk/subversion/libsvn_fs_x/noderevs.c
subversion/trunk/subversion/svnserve/serve.c
Modified: subversion/trunk/subversion/libsvn_fs_x/changes.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/changes.c?rev=1533970&r1=1533969&r2=1533970&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.c Sun Oct 20 20:31:44 2013
@@ -249,8 +249,10 @@ svn_fs_x__changes_get_list(apr_array_hea
/* validate index */
if (idx + 1 >= (apr_size_t)changes->offsets->nelts)
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Changes list index %" APR_SIZE_T_FMT
- " exceeds container size %d"),
+ apr_psprintf(pool,
+ _("Changes list index %%%s"
+ " exceeds container size %%d"),
+ APR_SIZE_T_FMT),
idx, changes->offsets->nelts - 1);
/* range of changes to return */
Modified: subversion/trunk/subversion/libsvn_fs_x/index.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/index.c?rev=1533970&r1=1533969&r2=1533970&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/index.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/index.c Sun Oct 20 20:31:44 2013
@@ -1220,13 +1220,16 @@ static svn_error_t *
l2p_page_get_offset(l2p_page_baton_t *baton,
const l2p_page_t *page,
const apr_off_t *offsets,
- const apr_uint32_t *sub_items)
+ const apr_uint32_t *sub_items,
+ apr_pool_t *pool)
{
/* overflow check */
if (page->entry_count <= baton->page_offset)
return svn_error_createf(SVN_ERR_FS_ITEM_INDEX_OVERFLOW , NULL,
- _("Item index %" APR_UINT64_T_FMT
- " too large in revision %ld"),
+ apr_psprintf(pool,
+ _("Item index %%%s too large in"
+ " revision %%ld"),
+ APR_UINT64_T_FMT),
baton->item_index, baton->revision);
/* return the result */
@@ -1254,7 +1257,7 @@ l2p_page_access_func(void **out,
= svn_temp_deserializer__ptr(page, (const void *const *)&page->sub_items);
/* return the requested data */
- return l2p_page_get_offset(baton, page, offsets, sub_items);
+ return l2p_page_get_offset(baton, page, offsets, sub_items, result_pool);
}
/* Data request structure used by l2p_page_table_access_func.
@@ -1484,7 +1487,7 @@ l2p_index_lookup(apr_off_t *offset,
/* cache the page and extract the result we need */
SVN_ERR(svn_cache__set(ffd->l2p_page_cache, &key, page, pool));
SVN_ERR(l2p_page_get_offset(&page_baton, page, page->offsets,
- page->sub_items));
+ page->sub_items, pool));
/* prefetch pages from following and preceding revisions */
pages = apr_array_make(pool, 16, sizeof(l2p_page_table_entry_t));
Modified: subversion/trunk/subversion/libsvn_fs_x/noderevs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/noderevs.c?rev=1533970&r1=1533969&r2=1533970&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/noderevs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/noderevs.c Sun Oct 20 20:31:44 2013
@@ -468,8 +468,10 @@ svn_fs_x__noderevs_get(node_revision_t *
/* validate index */
if (idx >= (apr_size_t)container->noderevs->nelts)
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Node revision index %" APR_SIZE_T_FMT
- " exceeds container size %d"),
+ apr_psprintf(pool,
+ _("Node revision index %%%s"
+ " exceeds container size %%d"),
+ APR_SIZE_T_FMT),
idx, container->noderevs->nelts);
/* allocate result struct and fill it field by field */
@@ -720,9 +722,11 @@ read_reps(apr_array_header_t **reps_p,
bytes = svn_packed__get_bytes(digest_stream, &len);
if (len != sizeof(rep.md5_digest))
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Unexpected MD5 digest size %"
- APR_SIZE_T_FMT),
- len);
+ apr_psprintf(pool,
+ _("Unexpected MD5"
+ " digest size %%%s"),
+ APR_SIZE_T_FMT),
+ len);
memcpy(rep.md5_digest, bytes, sizeof(rep.md5_digest));
if (rep.has_sha1)
@@ -730,9 +734,11 @@ read_reps(apr_array_header_t **reps_p,
bytes = svn_packed__get_bytes(digest_stream, &len);
if (len != sizeof(rep.sha1_digest))
return svn_error_createf(SVN_ERR_FS_CONTAINER_INDEX, NULL,
- _("Unexpected SHA1 digest size %"
- APR_SIZE_T_FMT),
- len);
+ apr_psprintf(pool,
+ _("Unexpected SHA1"
+ " digest size %%%s"),
+ APR_SIZE_T_FMT),
+ len);
memcpy(rep.sha1_digest, bytes, sizeof(rep.sha1_digest));
}
Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1533970&r1=1533969&r2=1533970&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Sun Oct 20 20:31:44 2013
@@ -2232,8 +2232,10 @@ static svn_error_t *log_cmd(svn_ra_svn_c
move_behavior = (svn_move_behavior_t) move_behavior_param;
else
return svn_error_createf(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
- _("Invalid move_behavior value %"
- APR_UINT64_T_FMT " in log command"),
+ apr_psprintf(pool,
+ _("Invalid move_behavior value"
+ " %%%s in log command"),
+ APR_UINT64_T_FMT),
move_behavior_param);
/* If we got an unspecified number then the user didn't send us anything,