Re: [fossil-users] TH1 exec

2015-03-11 Thread Abilio Marques
For those interested in a TH1 exec command, I took the ideas from Stephan and Ron, and mixed a few of my own. Here I present my latest version for the exec command I'm using. Now I directly call the functions already included in src/popen.c This time, it can take up to 3 parameters: *exec

Re: [fossil-users] TH1 exec

2015-02-05 Thread Abilio Marques
Here the current code (missing the capture of the stdout). I send it as a patch to the current trunk version (0d1d7f6481). Ideas? On Sat, Jan 31, 2015 at 9:56 AM, Stephan Beal sgb...@googlemail.com wrote: On Sat, Jan 31, 2015 at 3:09 PM, Abilio Marques abili...@gmail.com wrote: I think

Re: [fossil-users] TH1 exec

2015-02-05 Thread Abilio Marques
Yeah, missed the attach... On Thu, Feb 5, 2015 at 11:39 AM, Abilio Marques abili...@gmail.com wrote: Here the current code (missing the capture of the stdout). I send it as a patch to the current trunk version (0d1d7f6481). Ideas? On Sat, Jan 31, 2015 at 9:56 AM, Stephan Beal

Re: [fossil-users] TH1 exec

2015-02-05 Thread Stephan Beal
On Thu, Feb 5, 2015 at 5:12 PM, Abilio Marques abili...@gmail.com wrote: Yeah, missed the attach... src/popen.c does a lot of the same stuff except... it fails fatally on error instead of returning TH_ERROR. Pedantically speaking, i prefer using error codes (like your patch), but fossil has a

Re: [fossil-users] TH1 exec

2015-02-05 Thread Ron W
On Thu, Feb 5, 2015 at 11:09 AM, Abilio Marques abili...@gmail.com wrote: Here the current code (missing the capture of the stdout). I send it as a patch to the current trunk version (0d1d7f6481). Ideas? I suggest altering the parameter processing to be: if ( argc == 3 ){ if

Re: [fossil-users] TH1 exec

2015-02-05 Thread Abilio Marques
Ohhh, I missed the attach in the first mail anyway, here it is: http://abiliojr.homenet.org:20001/public/exec.diff On Thu, Feb 5, 2015 at 11:41 AM, Stephan Beal sgb...@googlemail.com wrote: On Thu, Feb 5, 2015 at 5:09 PM, Abilio Marques abili...@gmail.com wrote: Here the current code

Re: [fossil-users] TH1 exec

2015-02-05 Thread Stephan Beal
On Thu, Feb 5, 2015 at 5:09 PM, Abilio Marques abili...@gmail.com wrote: Here the current code (missing the capture of the stdout). I send it as a patch to the current trunk version (0d1d7f6481). The list strips (IIRC) attachments - try pasting it into your mail or posting a link to it. --

Re: [fossil-users] TH1 exec

2015-01-31 Thread Stephan Beal
On Sat, Jan 31, 2015 at 3:09 PM, Abilio Marques abili...@gmail.com wrote: I think that adding the ability to capture the app stdout (and stderr) would be a great thing. That way it could be even more powerful than git hooks. There is some code in fossil for capturing piped i/o, but i have no

[fossil-users] TH1 exec

2015-01-31 Thread Abilio Marques
Hi, To make a long story short, I've always desired to run a script on a hook feature. After a few times needing it, I decided to make a version of it myself (I think some people had done this in the past). I remember talking with someone about this feature (a few days ago I thought it was with