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

Re: svn commit: r1731656 - /subversion/trunk/subversion/svnserve/serve.c

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Tue, 23 Feb 2016 10:04:05 +0100

On 22.02.2016 16:29, James McCoy wrote:
>
> On Feb 22, 2016 10:10 AM, <stefan2_at_apache.org
> <mailto:stefan2_at_apache.org>> wrote:
> >
> > Author: stefan2
> > Date: Mon Feb 22 15:06:40 2016
> > New Revision: 1731656
> >
> > URL: http://svn.apache.org/viewvc?rev=1731656&view=rev
> > Log:
> > Switch svnserve to using the streamy log API.
>
> > --- subversion/trunk/subversion/svnserve/serve.c (original)
> > +++ subversion/trunk/subversion/svnserve/serve.c Mon Feb 22 15:06:40
> 2016
> > @@ -87,6 +87,9 @@ typedef struct log_baton_t {
> > const char *fs_path;
> > svn_ra_svn_conn_t *conn;
> > int stack_depth;
> > +
> > + /* Set to TRUE when at least one changed path has been sent. */
> > + svn_boolean_t started;
> > } log_baton_t;
> >
> > typedef struct file_revs_baton_t {
> > @@ -2187,14 +2190,58 @@ get_mergeinfo(svn_ra_svn_conn_t *conn,
> > return SVN_NO_ERROR;
> > }
> >
> > -/* Send a log entry to the client. */
> > -static svn_error_t *log_receiver(void *baton,
> > - svn_log_entry_t *log_entry,
> > - apr_pool_t *pool)
> > +/* Send a changed paths list entry to the client.
> > + This implements svn_repos_path_change_receiver_t. */
> > +static svn_error_t *
> > +path_change_receiver(void *baton,
> > + svn_repos_path_change_t *change,
> > + apr_pool_t *scratch_pool)
> > +{
> > + const char symbol[] = "MADR";
> > +
> > + log_baton_t *b = baton;
> > + svn_ra_svn_conn_t *conn = b->conn;
> > +
> > + /* Sanitize and convert change kind to ra-svn level action.
> > +
> > + Pushing that conversion down into libsvn_ra_svn would add yet
> another
> > + API dependency there. */
> > + char action = ( change->change_kind < svn_fs_path_change_modify
> > + || change->change_kind > svn_fs_path_change_replace)
> > + ? 0
> > + : symbol[change->change_kind];
> > +
> > + /* Open lists once: LOG_ENTRY and LOG_ENTRY->CHANGED_PATHS. */
> > + if (!b->started)
> > + {
> > + SVN_ERR(svn_ra_svn__start_list(conn, scratch_pool));
> > + SVN_ERR(svn_ra_svn__start_list(conn, scratch_pool));
>
> Is this supposed to be duplicated?
>
No, those are actually 2 tuples (one for the LOG_ENTRY
struct and one for the CHANGED_PATHS list inside it as
the first sub-element). I tried to hint at that in the comment
just above that block. The svn:// protocol is quite lisp-y
in its use of parentheses ...

But still, thanks for reviewing the changes!

-- Stefan^2.
Received on 2016-02-23 10:04:25 CET

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.