Re: [fossil-users] Action-based automation and scripting

2018-01-28 Thread Ron W
On Sun, Jan 28, 2018 at 7:00 AM, 
wrote:

> Date: Sat, 27 Jan 2018 17:22:39 -0500
> From: "Joe Mistachkin" 
> Subject: Re: [fossil-users] Action-based automation and scripting
>
> The following pages may be of help to you:
>
> https://www.fossil-scm.org/fossil/doc/trunk/www/th1.md
>
> https://www.fossil-scm.org/fossil/doc/trunk/www/th1-hooks.md
>
> TH1, by itself, cannot do things like send mail, write files, etc.
>

th1.md claims TH! has an http command that can send an HTTP request (get or
put) to a specified URL. (However, only asynchronous requests are currently
implemented, so no way to receive the response.)

With just TH1, you should be able to send some information to a HTTP based
service, which could then perform more complex operations with that
information. (But, the TH1 hook won't get any confirmation that the service
received the information.)
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Action-based automation and scripting

2018-01-27 Thread Joe Mistachkin

Damien Garwood wrote:
> 
> 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. 
> 

The following pages may be of help to you:

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

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

TH1, by itself, cannot do things like send mail, write files, etc.

However, Fossil can be compiled with "full" Tcl integration support using
something like the following:

./configure --with-tcl=1 and --with-tcl-private-stubs=1

Then, once the "tcl" setting is enabled on the target repository, you can
use
the [tclEval] command (and related commands) in TH1 to interact with full
Tcl,
which can do practically anything you would like.

--
Joe Mistachkin 

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Action-based automation and scripting

2018-01-27 Thread Damien Garwood

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


Re: [fossil-users] Action-based automation and scripting

2017-08-11 Thread Stephan Beal
On Fri, Aug 11, 2017 at 10:27 PM, Warren Young  wrote:

> 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.
>

Anyone interested in doing so, please feel free to get in touch with me
on-list or off, but be aware that it won't be a cake-walk - you will have
to get your hands dirty and figure out how fossil works internally (much of
which is documented in the libfossil API docs, however). If a new owner
needs a place to host it, i would be happy to continue hosting it for them.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"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


Re: [fossil-users] Action-based automation and scripting

2017-08-11 Thread Warren Young
On Aug 11, 2017, at 7:03 AM, Damien Sykes-Lindley  
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


Re: [fossil-users] Action-based automation and scripting

2017-08-11 Thread Stephan Beal
On Fri, Aug 11, 2017 at 4:25 PM, Damien Sykes-Lindley <
dam...@dcpendleton.plus.com> wrote:

> Oh wow. That must be so frustrating. Keyboards, both musical and computer,
> are the centre of my life right now, so if that ever happened to me I would
> be completely devastated.
> Hope things work out for you.
>

The first six months were depressing, but humans can adapt to anything. You
eventually get used to not having to get up every morning, not having to go
to bed early, and basically just being a lazy old fart! :)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"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


Re: [fossil-users] Action-based automation and scripting

2017-08-11 Thread Damien Sykes-Lindley
Hi Stephan,
Oh wow. That must be so frustrating. Keyboards, both musical and computer, are 
the centre of my life right now, so if that ever happened to me I would be 
completely devastated.
Hope things work out for you.
Best,
Damien.


From: Stephan Beal 
Sent: Friday, August 11, 2017 2:18 PM
To: Fossil SCM user's discussion 
Subject: Re: [fossil-users] Action-based automation and scripting

On Fri, Aug 11, 2017 at 3:03 PM, Damien Sykes-Lindley 
 wrote:

  Also, like Git has LibGit for managing repositories, does Fossil have such a 
library? I know someone was working on LibFossil - does this give total access 
or is it still a work in progress?

That was me. An unusually extreme case of RSI ("Sulcus-ulnaris Syndrome" in 
both arms) has removed me completely from the programming scene the past 
nearly-3 years, so libfossil is deal until/unless someone wants to take it over 
(which involves bringing it up to date with the SHA changes). i'm currently 
waiting on the paperwork to go through for my early retirement due to inability 
to work (my hands and elbows can't handle much activity anymore), and my 
programming days are over until/unless my hands eventually fully recover (it's 
not clear whether they ever will or not).

-- 

- stephan beal
http://wanderinghorse.net/home/stephan/ 
"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
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Action-based automation and scripting

2017-08-11 Thread Stephan Beal
On Fri, Aug 11, 2017 at 3:03 PM, Damien Sykes-Lindley <
dam...@dcpendleton.plus.com> wrote:

> Also, like Git has LibGit for managing repositories, does Fossil have such
> a library? I know someone was working on LibFossil - does this give total
> access or is it still a work in progress?
>

That was me. An unusually extreme case of RSI ("Sulcus-ulnaris Syndrome" in
both arms) has removed me completely from the programming scene the past
nearly-3 years, so libfossil is deal until/unless someone wants to take it
over (which involves bringing it up to date with the SHA changes). i'm
currently waiting on the paperwork to go through for my early retirement
due to inability to work (my hands and elbows can't handle much activity
anymore), and my programming days are over until/unless my hands eventually
fully recover (it's not clear whether they ever will or not).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
"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


[fossil-users] Action-based automation and scripting

2017-08-11 Thread Damien Sykes-Lindley
Hi there,
Is it possible for Fossil to run scripts when performing operations like 
creating new repositories, importing, exporting, committing etc?
I'm guessing there will be somewhere, since sometimes people want to have an 
automated commit build, mail announcements and the likes, without having to 
manually edit and rebuild Fossil to make it work like that. I just can't seem 
to find it documented.
Also, like Git has LibGit for managing repositories, does Fossil have such a 
library? I know someone was working on LibFossil - does this give total access 
or is it still a work in progress?
Cheers.
Damien.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users