There are docs on --with-tcl and the commands it provides (see th1.md in the 
source tree).  Also, with Tcl enabled the hooks work perfectly for sending mail 
and I've personally been doing so for several years on a repository of mine.

Sent from my iPhone

> On Aug 31, 2015, at 9:40 AM, Warren Young <w...@etr-usa.com> wrote:
> 
>> On Aug 30, 2015, at 2:27 AM, Stephan Beal <sgb...@googlemail.com> wrote:
>> 
>>> On Sun, Aug 30, 2015 at 10:15 AM, Baptiste Daroussin 
>>> <baptiste.darous...@gmail.com> wrote:
>>> Number #1 is the inhability to run "external" hooks easily
>> 
>> it's difficult to do portably
> 
> system() is ANSI C.
> 
> There are many external programs you can call that way.  All that’s needed is 
> some kind of hook-calling protocol, a la CGI.
> 
>> it opens up many more potential failure cases
> 
> I don’t see what’s difficult about failing a transaction if a hook is defined 
> and the external program call fails.  All the difficult parts are fobbed off 
> on the person writing the hook script.
> 
>> what happens to a commit if an http connection to an external server, used 
>> by a trigger, cannot be established?
> 
> The commit fails, same as if the process of attempting the commit causes any 
> other error, such as a fork without --allow-fork.
> 
>> Many hosting environments do not allow hosted scripts/apps to establish 
>> outbound connections with external servers
> 
> If you’re on such a host, you don’t get to use hooks.  Switch to a different 
> hosting provider if you need hooks.  There are dozens of bare-bones VPS and 
> cloud hosting providers without this restriction.
> 
> Also, this restriction only affects those who go out of their way to use 
> hooks.  If you don’t define any hooks, Fossil will behave the same as it does 
> today.
> 
>> Fossil does have basic hooks support in the form of TH1/TCL scripts,
> 
> You have to configure Fossil with --with-th1-hooks to enable it.
> 
> Also, as far as I can tell, TH1 doesn’t have the power to implement an SMTP 
> client or call out to an external one anyway.  (i.e. no equivalent of 
> connect(2) or system(3).)
> 
> I was curious how Git handles this, and to a first approximation, it doesn’t. 
>  It includes a 1,700 line Perl script which either calls out to sendmail(1) 
> or uses the Perl Net::SMTP library to do all the heavy lifting.
> 
>    https://github.com/git/git/blob/master/git-send-email.perl
> 
> My point above is that even these options aren’t available to TH1.
> 
> I see that Fossil has --with-tcl, which might be able to solve this, but I 
> don’t see any documentation explaining it on the Fossil site.
> 
>> There is no _portable_ external provider API for sending mails.
> 
> Not for C, true, but Tcl can do it: http://wiki.tcl.tk/1256
> 
> For platforms where linking to Tcl isn’t suitable, TH1 could add the exec and 
> open commands:
> 
>   https://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html
> 
> Then Fossil proper wouldn’t have to worry about such things as how to send 
> email.
> 
>> My point was not so much about the multiline support, but the lack (in my 
>> experience) of need for book-length commit messages. Without those, the lack 
>> of multi-line support is moot.
> 
> Straw man.  Adding a small bit of markup to a commit message is not writing 
> books.  And it’s a good thing, since Markdown is not the right formatting 
> system for book production anyway.
> 
> Most of the code needed to do this is in Fossil already.
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> 
_______________________________________________
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