You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2006/02/04 23:15:57 UTC

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

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