Zip downloads from Trac
UPDATE: See the first comment, It's built in and easy! And apparently completely undocumented anywhere on the internets...
Hey you geeks out there! I'm looking for a "nightly build" or on-demand archive plugin for Subversion or Trac and I'm wondering if perhaps the Greater Vox knowledge base has any leads for me.
What I would hope to do is make something like this accessible to normal users who don't know what Subversion is via a special URL. For example, if they are trying to get a zip archive of:
http://code.sixapart.com/trac/mtplugins/browser/trunk/RebuildQueue/
...they could just go to:
http://code.sixapart.com/trac/mtplugins/browser/trunk/RebuildQueue/download/zip
...or maybe:
http://code.sixapart.com/svn/mtplugins/trunk/RebuildQueue/download/zip
The actual URLs aren't the important part here. What is important is that there is a brainless way to get a downloadable archive of source code via a browser from Trac or Subversion and that implementing this system is equally brainless.
Is there anything out there which does this or is this really a roll-your-own system?
Comments
Trac rocks...
1. Go to your Trac installation and click on Browse Source
2. Click through the source until you find the root directory that you'd like to download
3. Click on the "Last change" link on the top right
4. In the address bar, you'll see something like "changeset/243" (which indicates the revision number you're looking at. Change the revision number to "latest" so that you have "changeset/latest"
5. To the end of that URL, add the following query string: ?old_path=/&filename=BASENAME&format=zip. Change BASENAME to the base file or directory name you'd like the zip archive to have. Normally, this is just the directory name that you wish to download
6. Hit enter and see your download start
Personally, if I were administering a Trac installation, I'd add an Apache rewrite rule or redirect to offer an easy URL like that mentioned in the original entry above. Easy as pie...