Re: [fossil-users] hooks in Fossil
mario ma...@include-once.org writes: Basically you'd prepare `th1-setup` (Admin Settings) with a script such as: proc command_notify {} { if {$::cmd_name eq push} { tclInvoke exec ./your/public-update-script } } Am I right that above would make *every* invocation of +push' to invoke updating script? That's something which I certainly do not want, having need to hook e.g. rsync only for specific repo(s). Sincerely, Gour -- One who restrains his senses, keeping them under full control, and fixes his consciousness upon Me, is known as a man of steady intelligence. ___ 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] hooks in Fossil
Abilio Marques abili...@gmail.com writes: You can hook the commit: admintransferscommit , but you'll need a way to make it copy the files. I have a similar setup with LaTeX generating a PDF every time I commit a change to the source. For this purpose I built an exec command for TH1. By pure luck I've just sent a patch for my latest version, under an email labeled TH1 exec. Maybe you can take a look at it, include it in the fossil source code, compile, and use it. If you do, any comments to improve it are welcomed. Thanks a lot, I'll take a look. I guess you can write a shell script (or bat in windows) and use something like rsync... Something like: rsync -a public/ remotedir is good enough. Sincerely, Gour -- When your intelligence has passed out of the dense forest of delusion, you shall become indifferent to all that has been heard and all that is to be heard. ___ 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] hooks in Fossil
Ron W ronw.m...@gmail.com writes: Another possibility might be RSS. I recall reading on this list where some have set up build servers, such as Jenkins, that monitor the Fossil RSS feed. I believe that's too complicated considering that atm I'm the only one generating the content... Sincerely, Gour -- ___ 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] hooks in Fossil
On Thu, Mar 12, 2015 at 5:48 AM, Gour g...@atmarama.net wrote: Ron W ronw.m...@gmail.com writes: Another possibility might be RSS. I recall reading on this list where some have set up build servers, such as Jenkins, that monitor the Fossil RSS feed. I believe that's too complicated considering that atm I'm the only one generating the content... While a build server is probably too complicated, a web content updater could be something like: #!/usr/bin/bash $PREVIOUS=/path/to/a/file $CURRENT=/path/to/another/file $INTERVAL=300 # time, in seconds, between checks for available updates while (1) do wget 'http://localhost:8080/timeline.rss?r=trunkn=1' | grep 'guid' $CURRENT cmp -s $PREVIOUS $CURRENT if [ $? -ne 0 ] # might need to be -eq instead of -ne (FYI: These are numeric compare in Bash) then fossil update rsync ./public $WWW/public # only needed if not serving directly from the check-out mv $CURRENT $PREVIOUS fi sleep $INTERVAL od ___ 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] hooks in Fossil
On Wed, Mar 11, 2015 at 8:29 AM, Gour g...@atmarama.net wrote: Now, I'd like that whenever I commit changes on my local machine and push them unto remote server, that the content of 'public' folder gets copied/synced to the remote server to the specific directory so that the site is automatically refreshed. Any hint how to accomplish it with Fossil? I've seen some posts about TH1 hooks, but not sure that's the right thing to do it. Users oF Git, of course, use Git's hooks in such scenario... I know very little about TH1 hooks, too. Another possibility might be RSS. I recall reading on this list where some have set up build servers, such as Jenkins, that monitor the Fossil RSS feed. ___ 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] hooks in Fossil
Wed, 11 Mar 2015 13:29:13 +0100 Gour g...@atmarama.net: Now, I'd like that whenever I commit changes on my local machine and push them unto remote server, that the content of 'public' folder gets copied/synced to the remote server to the specific directory so that the site is automatically refreshed. Any hint how to accomplish it with Fossil? I've seen some posts about TH1 hooks, but not sure that's the right thing to do it. You could use TH1 hooks for this, but it's sort of a two-step process if you want to invoke external commands. You strictly need Fossil built with TCL, as TH1 doesn't expose system calls (yet). Basically you'd prepare `th1-setup` (Admin Settings) with a script such as: proc command_notify {} { if {$::cmd_name eq push} { tclInvoke exec ./your/public-update-script } } You can easily do the same with the Admin Transfer hooks. (They're just less general than TH1 hooks, meant for the most common tasks.) Either add a TCL exec as `Push` script there: tclInvoke exec ... Or alternatively just use a webserver callback script: http http://localhost/fossil/update-public-repo.cgi; (Perhaps more work to wrap your updating script as CGI handler though..) ___ 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] hooks in Fossil
You can hook the commit: admintransferscommit , but you'll need a way to make it copy the files. I have a similar setup with LaTeX generating a PDF every time I commit a change to the source. For this purpose I built an exec command for TH1. By pure luck I've just sent a patch for my latest version, under an email labeled TH1 exec. Maybe you can take a look at it, include it in the fossil source code, compile, and use it. If you do, any comments to improve it are welcomed. I guess you can write a shell script (or bat in windows) and use something like rsync... dunno which is your remote server setup. You will be calling that one from the hook. On Wed, Mar 11, 2015 at 12:25 PM, Ron W ronw.m...@gmail.com wrote: On Wed, Mar 11, 2015 at 8:29 AM, Gour g...@atmarama.net wrote: Now, I'd like that whenever I commit changes on my local machine and push them unto remote server, that the content of 'public' folder gets copied/synced to the remote server to the specific directory so that the site is automatically refreshed. Any hint how to accomplish it with Fossil? I've seen some posts about TH1 hooks, but not sure that's the right thing to do it. Users oF Git, of course, use Git's hooks in such scenario... I know very little about TH1 hooks, too. Another possibility might be RSS. I recall reading on this list where some have set up build servers, such as Jenkins, that monitor the Fossil RSS feed. ___ 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