Edgewall Software
Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#10673 closed enhancement (fixed)

Clarify in TracIni documentation how to set downloadable_paths for a multirepository environment

Reported by: Ryan J Ollos <ryano@…> Owned by: Ryan J Ollos <ryan.j.ollos@…>
Priority: normal Milestone: 1.0.1
Component: version control/browser Version: 0.12.3
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Improved TracIni documentation on how to set downloadable_paths in a multi-repository environment.

API Changes:
Internal Changes:

Description

I have a multirepository environment and was attempting to set the downloadlable_path option in the browser section. By trial and error, I arrived at the finding that I must prefix the repository name to these paths. It seems like it would be useful to add this to the documentation. Suggested addition in italics:

List of repository paths that can be downloaded. Leave the option empty if you want to disable all downloads, otherwise set it to a comma-separated list of authorized paths (those paths are glob patterns, i.e. "*" can be used as a wild card). In a multi-repository environment, the repository name must be prefixed to the paths (e.g. /repos1/trunk, /repos2/trunk) (since 0.10)

… or is this idea of prefixing the repository name to trac.ini options more obvious and I've overlooked it elsewhere in the documentation? In retrospect, I shouldn't be so surprised that I have to prefix the repository name, but the exact syntax for the prefixing wasn't obvious to me. At first I tried repos1:/trunk, before noticing that the path in the repository browser was /repos/trunk, which made the solution more obvious. It also wasn't obvious to me though that simply specifying /trunk, wouldn't make /trunk a downloadable path for the default repository.

Attachments (1)

t10673-r11111-1.patch (1.2 KB ) - added by Ryan J Ollos <ryano@…> 12 years ago.
Patch against r11111 of the trunk.

Download all attachments as: .zip

Change History (9)

comment:1 by Ryan J Ollos <ryano@…>, 12 years ago

Minor refinement to clarify that the repository name only needs to be included in the path if it is not the default repository.

List of repository paths that can be downloaded. Leave the option empty if you want to disable all downloads, otherwise set it to a comma-separated list of authorized paths (those paths are glob patterns, i.e. "*" can be used as a wild card). In a multi-repository environment, the path must be qualified with the repository name if the path does not point to the default repository (e.g. /reposname/trunk) (since 0.10).

In testing this out, I found what might be considered a minor bug. If I have two repositories, repos and repos2, with repos being the default repository, then [source:/repos/trunk] and [source:/trunk] point to the same location in the default repository. However, dowloadable_paths = /repos/trunk does not result in a download link being added to the trunk directory in the default repository. Only downloadable_paths = /trunk works correctly.

in reply to:  1 ; comment:2 by Christian Boos, 12 years ago

Replying to Ryan J Ollos <ryano@…>:

Minor refinement to clarify that the repository name only needs to be included in the path if it is not the default repository.

List of repository paths that can be downloaded. Leave the option empty if you want to disable all downloads, otherwise set it to a comma-separated list of authorized paths (those paths are glob patterns, i.e. "*" can be used as a wild card). In a multi-repository environment, the path must be qualified with the repository name if the path does not point to the default repository (e.g. /reposname/trunk) (since 0.10).

Patch please!

In testing this out, I found what might be considered a minor bug. If I have two repositories, repos and repos2, with repos being the default repository, then [source:/repos/trunk] and [source:/trunk] point to the same location in the default repository. However, dowloadable_paths = /repos/trunk does not result in a download link being added to the trunk directory in the default repository. Only downloadable_paths = /trunk works correctly.

Or you can add a warning about this in the docstring as well (much easier than adding the necessary code!):

Note that a simple prefix matching is performed on the paths, so aliases won't get automatically resolved.

by Ryan J Ollos <ryano@…>, 12 years ago

Attachment: t10673-r11111-1.patch added

Patch against r11111 of the trunk.

in reply to:  2 comment:3 by Ryan J Ollos <ryano@…>, 12 years ago

Replying to cboos:

Or you can add a warning about this in the docstring as well (much easier than adding the necessary code!):

I had spent a bit of time looking at the code for this, and it did look challenging indeed.

t10673-r11111-1.patch implements the proposed documentation changes, including your suggestions re prefix matching.

comment:4 by Remy Blank, 12 years ago

Milestone: 1.0.1
Owner: set to Remy Blank
Status: newassigned

comment:5 by Remy Blank, 12 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in [11506].

comment:6 by Remy Blank, 12 years ago

Owner: changed from Remy Blank to Ryan J Ollos <ryano@…>

comment:7 by Remy Blank, 12 years ago

Owner: changed from Ryan J Ollos <ryano@…> to Ryan J Ollos <ryan.j.ollos@…>

comment:8 by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos <ryan.j.ollos@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos <ryan.j.ollos@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.