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

Re: svn commit: r15002 - in trunk/subversion: clients/cmdline include libsvn_client tests/clients/cmdline

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-06-09 00:33:05 CEST

kfogel@collab.net wrote:
> julianfoad@tigris.org writes:
>>+ * @deprecated Provided for backward compatibility with the 1.2 API.
>> */
>> svn_error_t *svn_client_import (svn_client_commit_info_t **commit_info,
>> const char *path,
>
> Should we be saying "1.2 API" there, or "1.0 API"?

I think I sometimes had a clear notion of which was more appropriate, but right
now I've no idea. Anyone?

>>+/* Schedule directory DIRNAME recursively for addition with access baton
>>+ * ADM_ACCESS.
>>+ *
>>+ * If DIRNAME (or any item below directory DIRNAME) is already scheduled for
>>+ * addition, add will fail and return an error unless FORCE is TRUE.
>>+ *
>>+ * Files and directories that match ignore patterns will not be added unless
>>+ * NO_IGNORE is TRUE.
>>+ *
>>+ * If CTX->CANCEL_FUNC is non-null, call it with CTX->CANCEL_BATON to allow
>>+ * the user to cancel the operation
>>+ */
>> static svn_error_t *
>> add_dir_recursive (const char *dirname,
>> svn_wc_adm_access_t *adm_access,
>> svn_boolean_t force,
>>+ svn_boolean_t no_ignore,
>> svn_client_ctx_t *ctx,
>> apr_pool_t *pool)
>> {
>
> Thank you for documenting this function!
>
> You might want to state that the ignore patterns are obtained from CTX
> (same in the public APIs). Not a big deal, just a non-expert reader
> might wonder where the patterns come from.

OK, I'll mark this message for attention and consider doing so.

>>@@ -633,7 +641,7 @@
>> SVN_ERR (ctx->cancel_func (ctx->cancel_baton));
>>
>> SVN_ERR (svn_io_dir_make (path, APR_OS_DEFAULT, subpool));
>>- err = svn_client_add (path, FALSE, ctx, subpool);
>>+ err = svn_client_add3 (path, FALSE, FALSE, FALSE, ctx, subpool);
>>
>> /* We just created a new directory, but couldn't add it to
>> version control. Don't leave unversioned directoies behind. */
>
> Why are ignores unconditional for svn_client_mkdir()? If ignore
> patterns might be obeyed here (which the FALSE flag above implies),
> then shouldn't we also offer an ability to override that?

That puzzled me when I reviewed the patch, but I investigated and found that
ignores are only applied to items found by recursion, not to explicitly given
targets. A directory made by "mkdir" is always an explicit target, so ignores
don't apply.

I mentioned that that behaviour (only applicable in recursion) is not
documented, and I'm not sure it's what I really want (but it's a hard call),
but I don't suppose that comment is enough to make anyone document it ... :-)
Any volunteers?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 9 00:34:18 2005

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