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

Re: svn commit: r30050 - in trunk/subversion: include svn tests/cmdline

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Tue, 25 Mar 2008 22:42:45 -0500

Karl Fogel wrote:
> hwright_at_tigris.org writes:
>> --- trunk/subversion/include/svn_error_codes.h (r30049)
>> +++ trunk/subversion/include/svn_error_codes.h (r30050)
>> @@ -193,6 +193,11 @@ SVN_ERROR_START
>> SVN_ERR_BAD_CATEGORY_START + 8,
>> "Bogus UUID")
>>
>> + /** @since New in 1.5. */
>> + SVN_ERRDEF(SVN_ERR_BAD_PATH,
>> + SVN_ERR_BAD_CATEGORY_START + 9,
>> + "Bogus path")
>> +
>> /* xml errors */
>>
>> SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
>>
>> --- trunk/subversion/svn/commit-cmd.c (r30049)
>> +++ trunk/subversion/svn/commit-cmd.c (r30050)
>> @@ -50,11 +50,22 @@ svn_cl__commit(apr_getopt_t *os,
>> svn_config_t *cfg;
>> svn_boolean_t no_unlock = FALSE;
>> svn_commit_info_t *commit_info = NULL;
>> + int i;
>>
>> SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
>> opt_state->targets,
>> pool));
>>
>> + /* Check that no targets are URLs */
>> + for (i = 0; i < targets->nelts; i++)
>> + {
>> + const char *target = APR_ARRAY_IDX(targets, i, const char *);
>> + if (svn_path_is_url(target))
>> + return svn_error_create(SVN_ERR_BAD_PATH, NULL,
>> + "Must give local path (not URL) as the "
>> + "target of a commit");
>> + }
>> +
>> /* Add "." if user passed 0 arguments. */
>> svn_opt_push_implicit_dot_target(targets, pool);
>
> Wouldn't the existing error code SVN_ERR_WC_BAD_PATH be fine for this?

I s'pose so. I just didn't know if it was appropriate to throw an
SVN_ERR_WC_* error from within the client.

-Hyrum

Received on 2008-03-26 04:43:02 CET

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.