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

Re: svn commit: r1296628 - Make svn ls faster and more streamy on svn://

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 6 Mar 2012 11:56:21 +0000 (GMT)

stefan2_at_apache.org wrote:

> Log:
> Make svn ls faster and more streamy on svn://
>
> * subversion/svnserve/serve.c
>   (get_dir): don't collect entries but send them immediately

> +  /* Fetch the directory entries if requested and send them immediately. */
>    if (want_contents)
>      {
> +      const char *zero_date = svn_time_to_cstring(0, pool);

This looks wrong.  Here you construct a date string something like "1 Jan 1970", to send if no date is available...

> +          cdate = NULL;
>            if ((dirent_fields & SVN_DIRENT_LAST_AUTHOR)
>                || (dirent_fields & SVN_DIRENT_TIME)
>                || (dirent_fields & SVN_DIRENT_CREATED_REV))
>              {
>                /* created_rev, last_author, time */
[...]
>                 SVN_CMD_ERR(svn_repos_get_committed_info(&entry.created_rev,
>                                                          &cdate,
>              }
> +          if (cdate == NULL)
> +            cdate = zero_date;
[...]
> -              if (cdate)
> -                SVN_CMD_ERR(svn_time_from_cstring(&entry->time, cdate,
> -                                                  subpool));
> -              else
> -                entry->time = (time_t) -1;
>             }
[...]
> -  /* Write out response. */
> -  if (want_contents)
> -    {
> -      for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
> -        {
> -          const char *name = svn__apr_hash_index_key(hi);
> -          svn_dirent_t *entry = svn__apr_hash_index_val(hi);
>
> -          cdate = (entry->time == (time_t) -1) ? NULL
> -            : svn_time_to_cstring(entry->time, pool);

... but the original code used NULL as the value to send if there was no date.

- Julian
Received on 2012-03-06 12:56:57 CET

This is an archived mail posted to the Subversion Dev mailing list.