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

Re: svn commit: r16158 - trunk/subversion/mod_dav_svn

From: <kfogel_at_collab.net>
Date: 2005-09-20 03:32:45 CEST

sussman@tigris.org writes:
> --- trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
> +++ trunk/subversion/mod_dav_svn/mod_dav_svn.c Mon Sep 19 08:28:15 2005
> @@ -187,6 +190,20 @@
> }
>
>
> +static const char *dav_svn_list_parentpath_cmd(cmd_parms *cmd, void *config,
> + int arg)
> +{
> + dav_svn_dir_conf *conf = config;
> +
> + if (arg)
> + conf->list_parentpath = DAV_SVN_FLAG_ON;
> + else
> + conf->list_parentpath = DAV_SVN_FLAG_OFF;
> +
> + return NULL;
> +}

Something tells me this function implements an interface type defined
by Apache HTTPD :-). If so, a short doc string should say that type's
name.

> --- trunk/subversion/mod_dav_svn/repos.c (original)
> +++ trunk/subversion/mod_dav_svn/repos.c Mon Sep 19 08:28:15 2005
> @@ -1210,6 +1267,31 @@
>
> repo_name = dav_svn_get_repo_name(r);
> xslt_uri = dav_svn_get_xslt_uri(r);
> + fs_parent_path = dav_svn_get_fs_parent_path(r);
> +
> + /* Special case: detect and build the SVNParentPath as a unique type
> + of private resource, iff the SVNListParentPath directive is 'on'. */
> + if (fs_parent_path && dav_svn_get_list_parentpath_flag(r))
> + {
> + char *uri = apr_pstrdup(r->pool, r->uri);
> + char *parentpath = apr_pstrdup(r->pool, root_path);
> + apr_size_t uri_len = strlen(uri);
> + apr_size_t parentpath_len = strlen(parentpath);
> +
> + if (uri[uri_len-1] == '/')
> + uri[uri_len-1] = '\0';
> +
> + if (parentpath[parentpath_len-1] == '/')
> + parentpath[parentpath_len-1] = '\0';
> +
> + if (strcmp(parentpath, uri) == 0)
> + {
> + err = get_parentpath_resource(r, root_path, resource);
> + if (err)
> + return err;
> + return NULL;
> + }
> + }

Why not just

     return get_parentpath_resource(r, root_path, resource);

at the end there?

Great change, though!

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 20 04:38:43 2005

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.