Hi there,
I didn't get around to looking at all the resources provided in the below email when it was sent. I know it was a fair while ago now, so not sure if much has changed since.
1. TH1Hooks
In the Fossil TH1 documentation, I can find nothing regarding hooks. I also can't seem to find anything regarding the sort of things I might want to do after a commit, such as email, writing to files etc. I'm assuming TH1 can't do this automatically and you've got to do some hackery to get that to work? Especially if you want to send it to somewhere like Twitter like GitHub can do.
2. timeline.rss
As it happens, I have never messed with RSS documents in my life so this would be a totally new adventure. However I'm guessing that would still need login credentials for private repositories, which would obviously make it difficult for external scripts to access.
3. LibFossil
Turning from scripting to mainstream programming is much more complicated than I originally anticipated, so trying to get LibFossil to work with Fossil 2 repositories is a bit beyond me right now, so I guess that won't be an option for a fair while.
4. JSON API:
The link for this only takes me to a GoogleDocs file so not quite sure how it sits in Fossil itself...Even if it was fully functional I believe this would have the same problem as the RSS - I.E. that it would need an authenticated user for private repos. If I could get it working, sounds to me like the TH1 option is the best, but again, it's knowing how that works and how to do more complicated things with it, as it only seems to list commands for checking different things in the repository and dealing with data and variable rather than complicated tasks like I/O or internet communication etc. On the other hand, I may even be missing something totally obvious with the other options. I doubt email would be possible at this moment, but even if I could make a script for Fossil to send some kind of message to my main PC or have my main PC monitor the repo somehow, for the time being, it would be better than nothing.
Cheers.
Damien.
-----Original Message----- From: Warren Young
Sent: Friday, August 11, 2017 9:27 PM
To: Fossil SCM user's discussion
Subject: Re: [fossil-users] Action-based automation and scripting

On Aug 11, 2017, at 7:03 AM, Damien Sykes-Lindley <dam...@dcpendleton.plus.com> wrote:

Is it possible for Fossil to run scripts when performing operations like creating new repositories, importing, exporting, committing etc?

There are several ways:

1. Tcl/TH1 script feature:

  https://www.fossil-scm.org/index.html/doc/trunk/www/th1.md

You probably want to be looking at th1Hooks.

2. React after the fact by monitoring /timeline.rss. This is sufficient for CI/CD integration, for example.

   https://www.fossil-scm.org/index.html/help?cmd=/timeline.rss

3. libfossil:

   http://fossil.wanderinghorse.net/repos/libfossil/index.cgi/wiki/home

Beware that it no longer works with Fossil 2.x repositories that use non-SHA-1 hashes. That’d the the first thing someone would need to fix, if they wanted to adopt the project.

4. Fossil’s JSON API:

   https://goo.gl/GSBUa2
_______________________________________________
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