Author: svn-role
Date: Thu Aug 15 04:00:44 2013
New Revision: 1514150
URL: http://svn.apache.org/r1514150
Log:
Merge the r1506966 group from trunk, with --accept=mc:
* r1506966, r1511603
Don't do double UTF8-to-native conversion in svnadmin notifications.
Justification:
Double conversion can produce garbled output in non-UTF8 environments.
Notes:
Reverts r1485650 on trunk, which was merged to 1.8.x in r1486284.
Merge with --accept mc to resolve conflict.
Votes:
+1: philip, danielsh, stefan2
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1506966,1511603
Modified: subversion/branches/1.8.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1514150&r1=1514149&r2=1514150&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Aug 15 04:00:44 2013
@@ -230,16 +230,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1506966, r1511603
- Don't do double UTF8-to-native conversion in svnadmin notifications.
- Justification:
- Double conversion can produce garbled output in non-UTF8 environments.
- Notes:
- Reverts r1485650 on trunk, which was merged to 1.8.x in r1486284.
- Merge with --accept mc to resolve conflict.
- Votes:
- +1: philip, danielsh, stefan2
-
* r1503010, r1503058, r1503061, r1503211
svn_utf_*: Describe APR errors as coming from APR.
Justification:
Modified: subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c?rev=1514150&r1=1514149&r2=1514150&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/1.8.x/subversion/svnadmin/svnadmin.c Thu Aug 15
04:00:44 2013
@@ -756,39 +756,6 @@ subcommand_deltify(apr_getopt_t *os, voi
return SVN_NO_ERROR;
}
-static void
-cmdline_stream_printf(svn_stream_t *stream,
- apr_pool_t *pool,
- const char *fmt,
- ...)
- __attribute__((format(printf, 3, 4)));
-
-static void
-cmdline_stream_printf(svn_stream_t *stream,
- apr_pool_t *pool,
- const char *fmt,
- ...)
-{
- const char *message;
- va_list ap;
- svn_error_t *err;
- const char *out;
-
- va_start(ap, fmt);
- message = apr_pvsprintf(pool, fmt, ap);
- va_end(ap);
-
- err = svn_cmdline_cstring_from_utf8(&out, message, pool);
-
- if (err)
- {
- svn_error_clear(err);
- out = svn_cmdline_cstring_from_utf8_fuzzy(message, pool);
- }
-
- svn_error_clear(svn_stream_puts(stream, out));
-}
-
/* Implementation of svn_repos_notify_func_t to wrap the output to a
response stream for svn_repos_dump_fs2() and svn_repos_verify_fs() */
@@ -798,35 +765,36 @@ repos_notify_handler(void *baton,
apr_pool_t *scratch_pool)
{
svn_stream_t *feedback_stream = baton;
+ apr_size_t len;
switch (notify->action)
{
case svn_repos_notify_warning:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- "WARNING 0x%04x: %s\n", notify->warning,
- notify->warning_str);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ "WARNING 0x%04x: %s\n",
notify->warning,
+ notify->warning_str));
return;
case svn_repos_notify_dump_rev_end:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Dumped revision %ld.\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Dumped revision %ld.\n"),
+ notify->revision));
return;
case svn_repos_notify_verify_rev_end:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verified revision %ld.\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verified revision %ld.\n"),
+ notify->revision));
return;
case svn_repos_notify_verify_rev_structure:
if (notify->revision == SVN_INVALID_REVNUM)
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verifying repository metadata ...\n"));
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying repository metadata ...\n")));
else
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verifying metadata at revision %ld ...\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying metadata at revision %ld ...\n"),
+ notify->revision));
return;
case svn_repos_notify_pack_shard_start:
@@ -834,14 +802,14 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Packing revisions in shard %s..."),
- shardstr);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Packing revisions in shard
%s..."),
+ shardstr));
}
return;
case svn_repos_notify_pack_shard_end:
- cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
return;
case svn_repos_notify_pack_shard_start_revprop:
@@ -849,30 +817,30 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Packing revprops in shard %s..."),
- shardstr);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Packing revprops in shard %s..."),
+ shardstr));
}
return;
case svn_repos_notify_pack_shard_end_revprop:
- cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
return;
case svn_repos_notify_load_txn_committed:
if (notify->old_revision == SVN_INVALID_REVNUM)
{
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("\n------- Committed revision %ld >>>\n\n"),
- notify->new_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("\n------- Committed revision %ld >>>\n\n"),
+ notify->new_revision));
}
else
{
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("\n------- Committed new rev %ld"
- " (loaded from original rev %ld"
- ") >>>\n\n"), notify->new_revision,
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("\n------- Committed new rev %ld"
+ " (loaded from original rev %ld"
+ ") >>>\n\n"), notify->new_revision,
+ notify->old_revision));
}
return;
@@ -881,27 +849,27 @@ repos_notify_handler(void *baton,
switch (notify->node_action)
{
case svn_node_action_change:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * editing path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_delete:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * deleting path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_add:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * adding path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_replace:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * replacing path : %s ..."),
- notify->path);
+ notify->path));
break;
}
@@ -909,30 +877,32 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_load_node_done:
- cmdline_stream_printf(feedback_stream, scratch_pool, _(" done.\n"));
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ "%s", _(" done.\n")));
return;
case svn_repos_notify_load_copied_node:
- cmdline_stream_printf(feedback_stream, scratch_pool, "COPIED...");
+ len = 9;
+ svn_error_clear(svn_stream_write(feedback_stream, "COPIED...", &len));
return;
case svn_repos_notify_load_txn_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("<<< Started new transaction, based on "
- "original revision %ld\n"),
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("<<< Started new transaction, based on "
+ "original revision %ld\n"),
+ notify->old_revision));
return;
case svn_repos_notify_load_skipped_rev:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("<<< Skipped original revision %ld\n"),
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("<<< Skipped original revision %ld\n"),
+ notify->old_revision));
return;
case svn_repos_notify_load_normalized_mergeinfo:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _(" removing '\\r' from %s ..."),
- SVN_PROP_MERGEINFO);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _(" removing '\\r' from %s ..."),
+ SVN_PROP_MERGEINFO));
return;
case svn_repos_notify_mutex_acquired:
@@ -941,17 +911,17 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_recover_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Repository lock acquired.\n"
- "Please wait; recovering the"
- " repository may take some time...\n"));
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Repository lock acquired.\n"
+ "Please wait; recovering the"
+ " repository may take some time...\n")));
return;
case svn_repos_notify_upgrade_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Repository lock acquired.\n"
- "Please wait; upgrading the"
- " repository may take some time...\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream,
+ _("Repository lock acquired.\n"
+ "Please wait; upgrading the"
+ " repository may take some time...\n")));
return;
default: