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

Re: svn commit: r18339 - trunk/subversion/libsvn_ra_serf

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-05 00:15:57 CET

On Fri, 3 Feb 2006 jerenkrantz@tigris.org wrote:

> Modified: trunk/subversion/libsvn_ra_serf/log.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_ra_serf/log.c?rev=18339&p1=trunk/subversion/libsvn_ra_serf/log.c&p2=trunk/subversion/libsvn_ra_serf/log.c&r1=18338&r2=18339
> ==============================================================================
> --- trunk/subversion/libsvn_ra_serf/log.c (original)
> +++ trunk/subversion/libsvn_ra_serf/log.c Fri Feb 3 21:21:49 2006
> @@ -38,43 +38,274 @@
> #include "ra_serf.h"
>
>
> +/**

You shouldn't use double asterisks when this is not a doxygen comment. (I
may fix this everywhere sometimes if you don't.)

> + * This enum represents the current state of our XML parsing for a REPORT.
> + */
> +typedef enum {
> + REPORT,
> + ITEM,
> + VERSION,
> + CREATOR,
> + DATE,
> + COMMENT,

Indentation.

> +
> typedef struct {
> apr_pool_t *pool;
>
> + /* parameters set by our caller */
> + int limit;
> + int count;
> + svn_boolean_t changed_paths;
> +
> /* XML Parser */
> XML_Parser xmlp;
>
> - /* Return error code */
> + /* Current namespace list */
> + ns_t *ns_list;
> +
> + /* Current state we're in */
> + log_state_list_t *state;
> + log_state_list_t *free_state;
> +
> + /* Return error code; if we exceed count, this may be set */
> svn_error_t *error;
>
> /* are we done? */
> svn_boolean_t done;
>
> - /* receiver function and baton */
> + /* log receiver function and baton */
> svn_log_message_receiver_t receiver;
> void *receiver_baton;
> } log_context_t;

Indentation.

> end_log(void *userData, const char *raw_name)
> {
> - abort();
> + log_context_t *log_ctx = userData;
> + dav_props_t name;
> + log_state_list_t *cur_state;
> +
> + if (!log_ctx->state)
> + {
> + return;
> + }
> +
> + cur_state = log_ctx->state;
> +
> + name = expand_ns(log_ctx->ns_list, raw_name, log_ctx->pool);
> +
> + if (cur_state->state == REPORT &&
> + strcmp(name.name, "log-report") == 0)
> + {
> + pop_state(log_ctx);
> + }
> + else if (cur_state->state == ITEM &&
> + strcmp(name.name, "log-item") == 0)
> + {
> + /* Give the info to the reporter */
> + log_ctx->receiver(log_ctx->receiver_baton,
> + cur_state->info->paths,
> + cur_state->info->version,
> + cur_state->info->creator,
> + cur_state->info->date,
> + cur_state->info->comment,
> + log_ctx->pool);
> +
Error leak.

//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 5 00:16:21 2006

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.