You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by bl...@apache.org on 2010/12/22 19:53:48 UTC
svn commit: r1052029 - /subversion/trunk/subversion/libsvn_repos/commit.c
Author: blair
Date: Wed Dec 22 18:53:48 2010
New Revision: 1052029
URL: http://svn.apache.org/viewvc?rev=1052029&view=rev
Log:
The error from the post-commit is already self-describing so
svn_repos__post_commit_error_str() doesn't need to wrap its error with
a duplicae "post-commit error" text.
Also, i18n the text.
Found by: danielsh
* subversion/libsvn_repos/commit.c
(svn_repos__post_commit_error_str):
Wrap all text with _().
Do not wrap errors from the post-commit hook with
"Post-commit hook had error".
Modified:
subversion/trunk/subversion/libsvn_repos/commit.c
Modified: subversion/trunk/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1052029&r1=1052028&r2=1052029&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Wed Dec 22 18:53:48 2010
@@ -653,7 +653,7 @@ svn_repos__post_commit_error_str(svn_err
const char *msg;
if (! err)
- return "(no error)";
+ return _("(no error)");
err = svn_error_purge_tracing(err);
@@ -671,33 +671,38 @@ svn_repos__post_commit_error_str(svn_err
svn_fs_commit_txn() as the parent error with a child
SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED error. If the parent error
is SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED then there was no error
- in svn_fs_commit_txn(). */
+ in svn_fs_commit_txn().
+
+ The post-commit hook error message is already self describing, so
+ it can be dropped into an error message without any additional
+ text. */
if (hook_err1)
{
if (err == hook_err1)
{
- msg = apr_psprintf(pool,
- "Post-commit hook had error '%s'.",
- hook_err2->message ? hook_err2->message
- : "(no error message)");
+ if (hook_err2->message)
+ msg = apr_pstrdup(pool, hook_err2->message);
+ else
+ msg = _("post-commit hook failed with no error message");
}
else
{
- msg = apr_psprintf(pool,
- "Post commit processing had error '%s' and "
- "post-commit hook had error '%s'.",
- err->message ? err->message
- : "(no error message)",
- hook_err2->message ? hook_err2->message
- : "(no error message)");
+ msg = hook_err2->message
+ ? hook_err2->message
+ : _("post-commit hook failed with no error message.");
+ msg = apr_psprintf(
+ pool,
+ _("post commit FS processing had error '%s' and %s"),
+ err->message ? err->message : _("(no error message)"),
+ msg);
}
}
else
{
msg = apr_psprintf(pool,
- "Post-commit processing had error '%s'.",
+ _("post-commit FS processing had error '%s'."),
hook_err2->message ? hook_err2->message
- : "(no error message)");
+ : _("(no error message)"));
}
/* Because svn_error_purge_tracing() was used on the input error,