On 22 November 2012 14:35, Jan Nijtmans <jan.nijtm...@gmail.com> wrote:
> 2012/11/22 Richard Hipp <d...@sqlite.org>:
>> Fossil understands check-in comments and ticket text to be Wiki/HTML.  Let's
>> say that the mimetype is "text/x-fossil-wiki".  This approach worked well
>> for us on CVSTrac (which was where many of the ideas in Fossil originated)
>> because it allowed hyperlinks to other check-ins, tickets, wiki, etc to be
>> embedded in the check-in comment text.
>
>
> I think I would fix that in the comment preprocessor. Before being
> committed, comments already have the pre-processing step that
> lines starting with '#' are eliminated. So, what of the following
> processing would be done in addition:
> - All '<', '>', '&', single and double-quotes are translated to their html
>   equivalent. &lt; &gt; &amp; &#39; &quot;
> - All newlines are translated to '\n<br>' (newline followed by '<br>'),
>   except for the last newline in the comment.
> - Maybe even all spaces translated to &nbsp; and all tabs with
>   multiple &nbsp;'es. (I don't really think this is necessary)
>
> Then the comment text is valid html, but will look like plain-text
> when viewed, nothing else needs to be changed.
> And a configuration option can be introduced whether those two additional
> proprocessor steps are wanted for the fossil client or not. No changes at
> all to the fossil server.
>
> Advantage:
> - Fully upwards/downwards compatible.
> - The main problem of having to html-escape the characters manually
>   is solved: the commit-message preprocessor does it for you.
> - no new mime-type has to be used.
> - Older commit-messages are displayed unchanged.
> - If more elaborate wiki markup is needed, it can always be
>   edited later in the UI.

The major disadvantage is, of course, that this ugly mess will be
likely visible in the command line view of the commits and that it
does not allow changing the commit message format. And this whole
thing is probably about allowing multiple commit formats to exist
cleanly in one repo.

Thanks

Michal
_______________________________________________
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