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

Re: changelist API : enhancement request

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-16 22:26:52 CET

Why are there printf()'s in the library APIs? We can't ship this or
anything like it without that TODO getting fixed...

Index: subversion/libsvn_client/changelist.c
===================================================================
--- subversion/libsvn_client/changelist.c (revision 23045)
+++ subversion/libsvn_client/changelist.c (working copy)
...
 svn_error_t *
-svn_client_set_changelist(const char *path,
+svn_client_set_changelist(const apr_array_header_t *paths,
                           const char *changelist_name,
                           svn_client_ctx_t *ctx,
                           apr_pool_t *pool)
 {
- SVN_ERR(svn_wc_set_changelist(path, changelist_name, pool));
+ int i;
+ apr_pool_t *iterpool = svn_pool_create(pool);
 
- /* ### TODO(sussman): create new notification type, and send
- notification feedback. See locking-commands.c. */
- if (changelist_name)
- printf("Path '%s' is now part of changelist '%s'.\n",
- path, changelist_name);
- else
- printf("Path '%s' is no longer associated with a changelist'.\n", path);
+ for (i = 0; i < paths->nelts; i++)
+ {
+ const char *path = APR_ARRAY_IDX(paths, i, const char *);
 
+ /* Check for cancellation */
+ if (ctx->cancel_func)
+ SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
+
+ svn_pool_clear(iterpool);
+ SVN_ERR(svn_wc_set_changelist(path, changelist_name, iterpool));
+
+ /* ### TODO(sussman): create new notification type, and send
+ notification feedback. See locking-commands.c. */
+ if (changelist_name)
+ printf("Path '%s' is now part of changelist '%s'.\n",
+ path, changelist_name);
+ else
+ printf("Path '%s' is no longer associated with a changelist'.\n", path);
+ }
+
+ svn_pool_destroy(iterpool);
+
   return SVN_NO_ERROR;
 }

  • application/pgp-signature attachment: stored
Received on Tue Jan 16 22:27:05 2007

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.