[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r14126 - trunk/subversion/clients/cmdline

From: <kfogel_at_collab.net>
Date: 2005-04-12 01:04:27 CEST

lundblad@tigris.org writes:
> Log:
> Don't invoke an editor for a lock comment. Also, error out if a lock
> comment or lock comment file is an existing path like the commit-like
> operations does.
>
> * subversion/clients/cmdline/main.c (svn_cl__cmd_table): Remove --editor-cmd
> option from lock command.
> (main): Use same rules for -m and -F regarding protection against
> the option arg being a path as the other operations taking -m and -F.
>
> * subversion/clients/cmdline/lock-cmd.c (get_comment): Don't invoke an
> editor.
> (svn_cl__lock): Don't care about a tempfile for lock comment editing.

Nice commit! Only a minor nit:

> --- trunk/subversion/clients/cmdline/main.c (original)
> +++ trunk/subversion/clients/cmdline/main.c Mon Apr 11 14:56:35 2005
> @@ -1208,10 +1210,16 @@
> err = svn_wc_entry (&e, fname_utf8, adm_access, FALSE, pool);
> if ((err == SVN_NO_ERROR) && e)
> {
> - err = svn_error_create
> - (SVN_ERR_CL_LOG_MESSAGE_IS_VERSIONED_FILE, NULL,
> - _("Log message file is a versioned file; "
> - "use '--force-log' to override"));
> + if (subcommand->cmd_func != svn_cl__lock)
> + err = svn_error_create
> + (SVN_ERR_CL_LOG_MESSAGE_IS_VERSIONED_FILE, NULL,
> + _("Log message file is a versioned file; "
> + "use '--force-log' to override"));
> + else
> + err = svn_error_create
> + (SVN_ERR_CL_LOG_MESSAGE_IS_VERSIONED_FILE, NULL,
> + _("Lock comment file is a versioned file; "
> + "use '--force-log' to override"));
> return error_exit (err, stderr, FALSE, pool);
> }
> if (err)
> @@ -1226,10 +1234,16 @@
> if (apr_stat (&finfo, dash_m_arg,
> APR_FINFO_MIN, pool) == APR_SUCCESS)
> {
> - err = 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"));
> + if (subcommand->cmd_func != svn_cl__lock)
> + err = 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_error_create
> + (SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME, NULL,
> + _("The lock comment is a pathname "
> + "(was -F intended?); use '--force-log' to override"));
> return error_exit (err, stderr, FALSE, pool);
> }
> }

For multi-line conditional bodies, I think we usually use curly braces.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 12 01:32:09 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.