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

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

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-07 08:20:45 CET

On Mon, 6 Feb 2006 jerenkrantz@tigris.org wrote:

> Added: trunk/subversion/libsvn_ra_serf/getloc.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_ra_serf/getloc.c?rev=18356
> ==============================================================================
> --- (empty file)
> +++ trunk/subversion/libsvn_ra_serf/getloc.c Mon Feb 6 16:06:51 2006
> @@ -0,0 +1,313 @@
> +
> +/**

Doxygen-style /**.

> + * This enum represents the current state of our XML parsing for a REPORT.
> + */
> +typedef enum {
> + REPORT,
> + LOCATION,

Indentation.

> +} loc_state_e;
> +
> +typedef struct {
> + /* pool to allocate memory from */

And here... :-)

> + apr_pool_t *pool;
> +
> + /* Returned location hash */
> + apr_hash_t *paths;
> +
> + /* XML Parser */
> + XML_Parser xmlp;
> +
> + /* Current namespace list */
> + ns_t *ns_list;
> +
> + /* Current state we're in */
> + loc_state_list_t *state;
> + loc_state_list_t *free_state;
> +
> + /* Return error code; if we exceed count, this may be set */

What does the part after the semi-colon mean?
> + svn_error_t *error;
> +
> + /* are we done? */
> + svn_boolean_t done;
> +
> +} loc_context_t;
> +
> +
...
> +svn_error_t *
> +svn_ra_serf__get_locations (svn_ra_session_t *ra_session,
> + apr_hash_t **locations,
> + const char *path,
> + svn_revnum_t peg_revision,
> + apr_array_header_t *location_revisions,
> + apr_pool_t *pool)
> +{
> + loc_context_t *loc_ctx;
> + ra_serf_session_t *session = ra_session->priv;
> + serf_request_t *request;
> + serf_bucket_t *buckets, *req_bkt, *tmp;
> + apr_hash_t *props;
> + const char *vcc_url, *relative_url, *baseline_url, *basecoll_url, *req_url;
> + int i;
> +
> + loc_ctx = apr_pcalloc(pool, sizeof(*loc_ctx));
> + loc_ctx->pool = pool;
> + loc_ctx->error = SVN_NO_ERROR;
> + loc_ctx->done = FALSE;
> + loc_ctx->paths = apr_hash_make(loc_ctx->pool);
> +
> + loc_ctx->xmlp = XML_ParserCreate(NULL);
> + XML_SetUserData(loc_ctx->xmlp, loc_ctx);
> + XML_SetElementHandler(loc_ctx->xmlp, start_getloc, NULL);

You don't set the end handler. Intentional?
> +
>

Best,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 7 08:21:11 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.