On Wed, May 14, 2014 at 5:55 PM, Stephan Beal <sgb...@googlemail.com> wrote:

> Would this strategy server your purpose:
>
> - add a (-format FORMAT) option to (wiki commit).
>
> - if no format is specified, use the format from the prior version (if
> there is one), defaulting to fossil-wiki if no prior version is set or the
> prior version has no explicit format.
>

That comes out looking something like:

[stephan@host:~/tmp/x]$ f-wiki ls
Time (local time)    UUID          Size   Name
2014-05-14 18:26:05  00620a7da105  324    Hosts

[stephan@host:~/tmp/x]$ f-acat 00620a7da105
...
N text/plain
...

[stephan@host:~/tmp/x]$ echo 'test 3' >> Hosts

[stephan@host:~/tmp/x]$ f wiki commit Hosts Hosts --format text/x-markdown
Updated wiki page Hosts.

[stephan@host:~/tmp/x]$ f-wiki ls
Time (local time)    UUID          Size   Name
2014-05-14 18:27:36  d90d62fe747d  331    Hosts

[stephan@host:~/tmp/x]$ f-acat d90d62fe747d | grep '^N '
N text/x-markdown

[stephan@host:~/tmp/x]$ echo 'test again' >> Hosts

[stephan@host:~/tmp/x]$ f wiki commit Hosts Hosts # NOTE: no --format
specified
Updated wiki page Hosts.

[stephan@host:~/tmp/x]$ f-wiki ls
Time (local time)    UUID          Size   Name
2014-05-14 18:28:57  a79e55d52c33  342    Hosts

[stephan@host:~/tmp/x]$ f-acat a79e55d52c33 | grep '^N '
N text/x-markdown


i need to test this a bit more before committing, and would like to
consider adding a filter which rejects any unknown mime types (but i'm not
sure that's such a good idea because i have uses for non-canon mime types
via the JSON API... btw, the JSON API now has a flat for setting the mime
type, too).

:-?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to