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

Re: [PATCH] bug(let) in mod_dav_svn: Cannot navigate from repository top to repository list when SVNListParentPath is on.

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Fri, 21 Mar 2008 12:22:45 +0200 (Jerusalem Standard Time)

Forwarding to dev@.

Jan, I can't seem to apply the patch (either to trunk or to
/tags/1.5.0-beta1). Could you please resubmit it as an attachment?

Daniel

Jan Nijtmans wrote on Fri, 21 Mar 2008 at 09:30 +0100:
> I'm really sorry to forward this directly to you, but for some reason
> mail from me directly to dev_at_subversion.tigris.org don't work.
> If you can, please forward it to dev_at_subversion.tigris.org, so
> it can be handled properly.
>
> Regards,
>
> ---------- Forwarded message ----------
> From: Jan Nijtmans <jan.nijtmans_at_gmail.com>
> Date: 20 mrt. 2008 12:38
> Subject: [PATCH] bug(let) in mod_dav_svn: Cannot navigate from
> repository top to repository list when SVNListParentPath is on.
> To: dev_at_subversion.tigris.org
>
>
> Reproduction recipe.
>
> - Go with your browser (IE or any other) to the top of any svn repository
> where SVNListParentPath is set to on, e.g.:
> <http://svn.webwideconsulting.com/plugins/friendship_plugin/>
> - Note that the super-directory (/plugins/) is browsable as well, but
> you cannot navigate to it from here.
> - I would expect that the first entry of the list is a hyperlinked "..",
> which would navigate to its super-directory.
>
> I checked this with the Collabnet win32 build of SVN 1.5.0-beta1,
> and the buglet is still there.
>
> Rationale: in repos.c, the decision whether to include the link or not
> is based on
> two things:
> - If repos_path is of length 1 (so it must be "/"), then skip this step
> - If the collection is of type DAV_SVN_RESTYPE_PARENTPATH_COLLECTION
> (the highest browsable directory), then skip this step too.
>
> This can be fixed by ignoring the first condition when
> SVNListParentPath is on.
> Unfortunately I don't have an environment set up to build mod_dav_svn to test
> this, but I'm pretty confident that this fix will work (for what's worth).
>
> Can I file an issue for this? See patch below.
>
> Regards,
> Jan Nijtmans
>
> Here is the patch against svn-1.5.0-beta1 (I re-ordered it a little because
> dav_svn__get_list_parentpath_flag() is a more expensive test, so it should
> be done last):
> ===========================================================================
> *** subversion/mod_dav_svn/repos.c.orig Fri Mar 14 17:51:28 2008
> --- subversion/mod_dav_svn/repos.c Mon Mar 17 12:38:05 2008
> ***************
> *** 2805,2812 ****
> ap_fputs(output, bb, ">\n");
> }
>
> ! if ((resource->info->repos_path &&
> resource->info->repos_path[1] != '\0')
> ! && (resource->info->restype !=
> DAV_SVN_RESTYPE_PARENTPATH_COLLECTION))
> {
> if (gen_html)
> ap_fprintf(output, bb, " <li><a href=\"../\">..</a></li>\n");
> --- 2805,2813 ----
> ap_fputs(output, bb, ">\n");
> }
>
> ! if ((resource->info->restype != DAV_SVN_RESTYPE_PARENTPATH_COLLECTION)
> ! && resource->info->repos_path &&
> ((resource->info->repos_path[1] != '\0')
> ! || dav_svn__get_list_parentpath_flag(resource->info->r)))
> {
> if (gen_html)
> ap_fprintf(output, bb, " <li><a href=\"../\">..</a></li>\n");
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-21 15:22:49 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.