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

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

From: <kfogel_at_collab.net>
Date: 2005-05-04 22:05:56 CEST

cmpilato@tigris.org writes:
> --- trunk/subversion/libsvn_client/commit.c (original)
> +++ trunk/subversion/libsvn_client/commit.c Mon Apr 18 11:01:10 2005
> @@ -46,6 +46,27 @@
>
> #include "svn_private_config.h"
>
> +/* Import context baton.
> +
> + ### TODO: Add the following items to this baton:
> + /` import editor/baton. `/
> + const svn_delta_editor_t *editor;
> + void *edit_baton;
> +
> + /` Client context baton `/
> + svn_client_ctx_t `ctx;
> +
> + /` Paths (keys) excluded from the import (values ignored) `/
> + apr_hash_t *excludes;
> +*/
> +typedef struct import_ctx_t
> +{
> + /* Whether any changes were made to the repository */
> + svn_boolean_t repos_changed;
> +
> +} import_ctx_t;

Just curious: what did this "### TODO" have in mind?

> /* Apply PATH's contents (as a delta against the empty string) to
> FILE_BATON in EDITOR. Use POOL for any temporary allocation.
> PROPERTIES is the set of node properties set on this file.
> @@ -154,8 +175,8 @@
> * Accumulate file paths and their batons in FILES, which must be
> * non-null. (These are used to send postfix textdeltas later).
> *
> - * If CTX->NOTIFY_FUNC is non-null, invoke it with CTX->NOTIFY_BATON for each
> - * file.
> + * If CTX->NOTIFY_FUNC is non-null, invoke it with CTX->NOTIFY_BATON
> + * for each file.
> *
> * Use POOL for any temporary allocation.
> */
> @@ -164,6 +185,7 @@
> void *dir_baton,
> const char *path,
> const char *edit_path,
> + import_ctx_t *import_ctx,
> svn_client_ctx_t *ctx,
> apr_pool_t *pool)
> {

The new 'import_ctx' parameter should be documented.

(This goes for import(), import_file(), and import_dir()).

> @@ -437,6 +466,7 @@
> apr_array_header_t *ignores;
> apr_array_header_t *batons = NULL;
> const char *edit_path = "";
> + import_ctx_t *import_ctx = apr_pcalloc (pool, sizeof (*import_ctx));

import_ctx's scope is confined to this invocation of import(). Don't
we typically allocate right on the stack in that case, instead of
using a pointer to pcalloc'd memory?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 4 22:41:19 2005

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