Kamesh Jayachandran <kamesh@collab.net> writes:
>> /* Update auto-props-enable option, and populate the MIME types
>> map,
>> - for add/import commands */
>> + for add/import commands. Also check for mutually exclusive options
>> + --auto-props and --no-auto-props */
>> if (subcommand->cmd_func == svn_cl__add
>> || subcommand->cmd_func == svn_cl__import)
>> {
>> + if (opt_state.autoprops && opt_state.no_autoprops)
>> + {
>> + err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
>> + _("--auto-props and --no-auto-props are "
>> + "mutually exclusive"));
>> + return svn_cmdline_handle_exit_error(err, pool, "svn: ");
>> + }
>> +
>>
> This code may not compile in older version of C compilers(code before
> declaration.)
I don't see any instance of code-before-decl here ('err' is already
declared), but do watch out for tabs -- those should be spaces
instead, so the indentation will come out right.
Also, why make it conditional on svn_cl__add or svn_cl__import? I
would think autoprops and no_autoprops would be mutually exclusive in
any conceivable universe :-). If so, it makes sense to check for the
exclusivity outside any other conditional, since the check is cheap.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 14 00:20:56 2007