You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ri...@apache.org on 2025/05/26 19:55:30 UTC
svn commit: r1925841 - /subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
Author: rinrab
Date: Mon May 26 19:55:30 2025
New Revision: 1925841
URL: http://svn.apache.org/viewvc?rev=1925841&view=rev
Log:
On the 'utf8-cmdline-prototype' branch: follow-up to r1925834: prevent 'log
message is pathname' warning from showing when the log message is empty.
Modified:
subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
Modified: subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c?rev=1925841&r1=1925840&r2=1925841&view=diff
==============================================================================
--- subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c (original)
+++ subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c Mon May 26 19:55:30 2025
@@ -3163,26 +3163,33 @@ sub_main(int *exit_code,
{
apr_finfo_t finfo;
- err = svn_io_stat(&finfo, opt_state.message, APR_FINFO_MIN, pool);
-
- if (!err)
+ /* We don't want to warn for '' */
+ if (opt_state.message[0] != '\0')
{
- if (subcommand->cmd_func != svn_cl__lock)
- {
- return svn_error_create
- (SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME, NULL,
- _("The log message is a pathname "
- "(was -F intended?); use '--force-log' to override"));
- }
- else
+ err = svn_io_stat(&finfo, opt_state.message,
+ APR_FINFO_MIN, pool);
+
+ if (!err)
{
- return svn_error_create
- (SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME, NULL,
- _("The lock comment is a pathname "
- "(was -F intended?); use '--force-log' to override"));
+ if (subcommand->cmd_func != svn_cl__lock)
+ {
+ return svn_error_create(
+ SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME, NULL,
+ _("The log message is a pathname "
+ "(was -F intended?); use '--force-log' to "
+ "override"));
+ }
+ else
+ {
+ return svn_error_create(
+ SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME, NULL,
+ _("The lock comment is a pathname "
+ "(was -F intended?); use '--force-log' to "
+ "override"));
+ }
}
+ svn_error_clear(err);
}
- svn_error_clear(err);
}
}
Re: svn commit: r1925841 - /subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
Posted by Timofei Zhakov <ti...@chemodax.net>.
>
>
> I like the special-casing of the error for lock comment vs. log message,
> but such changes that are unrelated to what you're doing on the branch
> should really be done on trunk, it makes the merge review a little easier
> later on.
>
>
I fully agree, but I'd prefer to first try this in the branch, then commit
such changes one-by-one.
--
Timofei Zhakov
Re: svn commit: r1925841 - /subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
Posted by Branko Čibej <br...@apache.org>.
On 26. 5. 25 21:55, rinrab@apache.org wrote:
> Author: rinrab
> Date: Mon May 26 19:55:30 2025
> New Revision: 1925841
>
> URL:http://svn.apache.org/viewvc?rev=1925841&view=rev
> Log:
> On the 'utf8-cmdline-prototype' branch: follow-up to r1925834: prevent 'log
> message is pathname' warning from showing when the log message is empty.
>
> Modified:
> subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
>
> Modified: subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c
> URL:http://svn.apache.org/viewvc/subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c?rev=1925841&r1=1925840&r2=1925841&view=diff
> ==============================================================================
> --- subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c (original)
> +++ subversion/branches/utf8-cmdline-prototype/subversion/svn/svn.c Mon May 26 19:55:30 2025
> @@ -3163,26 +3163,33 @@ sub_main(int *exit_code,
> {
> apr_finfo_t finfo;
>
> - err = svn_io_stat(&finfo, opt_state.message, APR_FINFO_MIN, pool);
> -
> - if (!err)
> + /* We don't want to warn for '' */
> + if (opt_state.message[0] != '\0')
So now you need more code to fix a side effect from r1925834.
svn_io_stat() interprets "" as the current directory, apr_stat() does not.
I like the special-casing of the error for lock comment vs. log message,
but such changes that are unrelated to what you're doing on the branch
should really be done on trunk, it makes the merge review a little
easier later on.
-- Brane