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 , 13 years ago
Milestone: | → 0.12.3 |
---|---|
Owner: | set to |
Summary: | Can't compare across different repositories: vs issue → Handle downloads as ZIP in BrowserModule instead of ChangesetModule |
comment:2 by , 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 , 13 years ago
Milestone: | 0.12.3 → 0.13 |
---|---|
Priority: | normal → high |
Type: | defect → enhancement |
That's actually an enhancement.
comment:4 by , 13 years ago
Milestone: | 0.13 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
There's a patch for this discussed in #8919.
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 theBrowserModule
request handler, which should allow simplifying the URL and make this work. I'll give it a try.