On Fri, Jan 3, 2014 at 12:26 PM, Roy Marples <[email protected]> wrote:
> On 03/01/2014 16:41, Lluís Batlle i Rossell wrote:
>
>> On Fri, Jan 03, 2014 at 04:36:26PM +0000, Roy Marples wrote:
>>
>
> Can fossil create an archive (tarball, zip file, etc) from a given
>>> artifact id WITHOUT using the web interface?
>>> Something like this is what I need:
>>> $ fossil archive ?ID | bzip2 > distribution-version.tar.bz2
>>>
>>
>> Hi,
>>
>> fossil tarball.
>>
>
> This works well, thanks.
> To use an alternate compression I can simply gunzip | bzip2 as this
> Makefile snippet shows
>
> FOSSILID?= current
>
> dist:
> fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
> gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE}
> rm ${DISTFILEGZ}
>
Two comments, reading the documentation from
http://fossil-scm.org/index.html/help?cmd=tarball :
(1) It would be nice if fossil tarball could write to stdout as well as to
a specified output file; this way, the creation of $(DISTFILEGZ) as an
explicit temporary file could be avoided. (I'm pretty sure gunzip provides
for accepting input from stdin as well as from an explicit file.)
Not having looked at the code or used fossil, I'm not sure if it would be
safe to gave fossil tarball behave this way if the value for OUTPUTFILE was
simply ommitted, or if you would have to specify that a flag (say
--to-stdout perhaps) must be specified if OUTPUTFILE was missing (this, to
avoid breaking existing scripts).
(2) It would be nice if fossil tarball could either (a) output a file only
in .tar format, either in addition to or instead of (tho this latter change
would be backwards incompatible) the existing specified *presumably*
.tar.gz format behavior, and/or (b) if you could specify a compression file
format to be used (for instance, .gz, .bzip2, .7z, etc) and perhaps in some
cases a compression level (some file formats offer multiple compression
levels along a range of "fastest and least compressive" to "slowest and
most compressive").
If you could output in only .tar format, then the use of gunzip could be
avoided. (And if you could output in only .tar format *and* output to
stdout, then you could pipe fossil tarball to bzip2 and avoid the creation
of an explicit temporary file.)
If you could output directly to a specified compression file format, then
the use of bzip2 could be avoided as well; fossil tarball could do it all
itself.
I note that some of these suggestions (2b at a minimum) are obviously
less-traditionally-Unix-natured. However, they'd probably be seen as
desirable by users (or at least less programmer-type users) of other
platforms (e.g. MS Windows, Mac OS/X) where I believe the use of a command
line, etc is far less ingrained.
Thanks for your time. Hope this is of some use, interest.
Joseph
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users