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

Re: svn commit: r21361 - in branches/incomplete-directories/subversion: libsvn_ra_dav libsvn_ra_serf libsvn_ra_svn mod_dav_svn/reports svnserve

From: Karl Fogel <kfogel_at_google.com>
Date: 2006-09-07 23:06:40 CEST

"Garrett Rooney" <rooneg@electricjellyfish.net> writes:
>> --- branches/incomplete-directories/subversion/libsvn_ra_serf/update.c (original)
>> +++ branches/incomplete-directories/subversion/libsvn_ra_serf/update.c Tue Sep 5 21:17:13 2006
>> @@ -1868,6 +1868,28 @@
>> serf_bucket_aggregate_append(report->buckets, tmp);
>> }
>>
>> + if (depth != svn_depth_infinity)
>> + {
>> + switch (depth) {
>> + case svn_depth_zero:
>> + tmp = SERF_BUCKET_SIMPLE_STRING_LEN(" depth=\"0\"",
>> + sizeof(" depth=\"0\"")-1,
>> + report->sess->bkt_alloc);
>> + break;
>> + case svn_depth_one:
>> + tmp = SERF_BUCKET_SIMPLE_STRING_LEN(" depth=\"1\"",
>> + sizeof(" depth=\"1\"")-1,
>> + report->sess->bkt_alloc);
>> + break;
>> + default:
>> + return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
>> + _("Invalid depth (%d) for path '%s'"),
>> + depth, path);
>> + }
>> +
>> + serf_bucket_aggregate_append(report->buckets, tmp);
>> + }
>> +
>> if (start_empty)
>> {
>> tmp = SERF_BUCKET_SIMPLE_STRING_LEN(" start-empty=\"true\"",
>> @@ -1937,7 +1959,6 @@
>> const char *path_copy, *link_copy, *vcc_url;
>> apr_uri_t uri;
>>
>> - /* ### TODO: send depth here */
>> tmp = SERF_BUCKET_SIMPLE_STRING_LEN("<S:entry rev=\"",
>> sizeof("<S:entry rev=\"")-1,
>> report->sess->bkt_alloc);
>> @@ -1975,6 +1996,28 @@
>> serf_bucket_aggregate_append(report->buckets, tmp);
>> }
>>
>> + if (depth != svn_depth_infinity)
>> + {
>> + switch (depth) {
>> + case svn_depth_zero:
>> + tmp = SERF_BUCKET_SIMPLE_STRING_LEN(" depth=\"0\"",
>> + sizeof(" depth=\"0\"")-1,
>> + report->sess->bkt_alloc);
>> + break;
>> + case svn_depth_one:
>> + tmp = SERF_BUCKET_SIMPLE_STRING_LEN(" depth=\"1\"",
>> + sizeof(" depth=\"1\"")-1,
>> + report->sess->bkt_alloc);
>> + break;
>> + default:
>> + return svn_error_createf(SVN_ERR_RA_DAV_PATH_NOT_FOUND,
>> + _("Invalid depth (%d) for path '%s'"),
>> + depth, path);
>> + }
>> +
>> + serf_bucket_aggregate_append(report->buckets, tmp);
>> + }
>> +
>
> Perhaps a helper function to abstract out these bits, since they show
> up more than once?

That would be the Right Thing, yes. I didn't do it because its a
duplication of an existing Duplication, and I felt I should either
clean them both up or neither, and wanted to stay on track... but I'll
put this on my TODO list. Thanks for the review, Garrett!

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 7 23:12:35 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.