View Ticket
Not logged in
Ticket UUID: c84ee1364f83e0fba18fb651a5a7af954a1596dd
Title: Export zip from cli
Status: Fixed Type: Feature_Request
Severity: Cosmetic Priority:
Subsystem: Resolution: Fixed
Last Modified: 2010-03-11 03:30:49
Version Found In:
Description & Comments:
It would be very handy the addition of a cli command (eg. zip/export) which exports a revision to a zip file, similar to the wiki feature. This is handy when a graphical browser is not available (eg. console only environment).
Thanks

anonymous claiming to be dlane added on 2010-03-03 16:29:51:
A workaround which works currently could be

$ curl "http://www.fossil-scm.org/fossil/zip/Fossil-71edacd95f.zip?uuid=71edacd95f" > 71edacd95f.zip

Fossil generally treats urls sanely and changes them slowly. It generally allows unique prefixes for artifacts: the browser url has a longer value for uuid but it turns out to be enough to replicate the shorter prefix that is available, for example in

$ fossil finfo <filename>

The perl/python/ruby/tcl(?) to bind these conveniently should not be very hard. Tags etc left as a Simple Exercise for the Reader.


ron added on 2010-03-03 18:55:16:
Actually, on Linux do "fossil set web-browser lynx". Then when you do "fossil ui", you will get the console 'lynx' browser (substitute some other browser if you like). This works nicely, I was able to get the zip this way without using Firefox etc.


anonymous claiming to be Ross Berteig added on 2010-03-11 03:21:19:
I just posted a patch to zip.c to the mailing list to implement a fossil zip command that understands a uuid (or prefix) or tag and creates a zip file that is identical to the one created by the web ui.

The existing fossil test-baseline-zip command produces archives that are very similar, but use a different name of the top level folder in the zip. And its undocumented.