Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

#10332 closed enhancement (duplicate)

Handle downloads as ZIP in BrowserModule instead of ChangesetModule

Reported by: anonymous Owned by: Remy Blank
Priority: high Milestone:
Component: version control/browser Version: 0.12.2
Severity: normal Keywords: download, zip, compare error
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm trying to get download link for one of my repositories via InterMapTxt page: download http://trissrv/trac/changeset/latest/$1old_path=/&filename=$1&format=zip # Download the zipped source

But [download:com_test] link gives me "Can't compare across different repositories: vs. com_test" error. I use VisualSVNServer+Tracv0.12 and have 2 repositories in one Trac environment. In trac.ini i set downloadable_paths = /*/trunk, /branches/*, /tags/* and i can download zipped archive via footer's link. But i want to make universal download link like on trac-hacks.org and use it on my trac/wiki pages. I unsuccessfully tried to find the solution on mail lists, can you help me?

Attachments (0)

Change History (4)

comment:1 by Remy Blank, 13 years ago

Milestone: 0.12.3
Owner: set to Remy Blank
Summary: Can't compare across different repositories: vs issueHandle downloads as ZIP in BrowserModule instead of ChangesetModule

This probably won't work using InterMapTxt, because the old_path= URL argument must point to the root of the repository you are downloading from, which will vary depending on the link content.

We should move the download code out of the ChangesetModule and into the BrowserModule request handler, which should allow simplifying the URL and make this work. I'll give it a try.

comment:2 by anonymous, 13 years ago

Thanks for your reply. Btw i tried the following prefix definition:

download http://trissrv/trac/changeset/latest/$1/trunk?old_path=$1&format=zip

Now the link works like i wanted (zip archive for full source code at lates revision), but output zip has ugly name trunk-X.zip X - revision. I think it depends on repository tree type. Anyway it would be nice to have download stuff in BrowserModule.

comment:3 by Remy Blank, 13 years ago

Milestone: 0.12.30.13
Priority: normalhigh
Type: defectenhancement

That's actually an enhancement.

comment:4 by Christian Boos, 13 years ago

Milestone: 0.13
Resolution: duplicate
Status: newclosed

There's a patch for this discussed in #8919.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank 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.