The current Fossil trunk is capable of using TH1 and Tcl in tandem.

First, during configure, enable Tcl support using:

        ./configure --with-tcl=/path/to/tcl

Then, make sure the "tcl" setting is enabled for the repository (or
globally).

        fossil settings tcl 1

Finally, in the TH1 script, you can use:

        tclEval {puts stdout "[clock seconds]"}
        tclInvoke puts stdout "via Tcl invoke"
        tclExpr 2+2

To obtain the full path and file name of the Fossil repository, the TH1
"repository" command may be used:

        tclInvoke set repository_name [repository 1]

Also, Tcl can evaluate TH1 scripts as well:

        tclInvoke th1Eval {set y "two words"}
        tclInvoke th1Expr {2+2}
        tclEval {set repository_name [th1Eval repository 1]}

When evaluating Tcl scripts from TH1, all Tcl commands and packages (e.g.
SQLite)
that would be available from tclsh are available in addition to the TH1
specific
commands th1Eval and th1Expr.

--
Joe Mistachkin

_______________________________________________
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