Re: [fossil-users] Quiet mode for update and sync

2014-10-19 Thread David Mason
Is there any hope this is going to make it into trunk? I think -hush is the best name for the flag (because it's not *quiet*, it's *quieter*), and I don't see any need for a short form, it's really only for use in scipts where typing 3 extra characters shouldn't be an issue. ../Dave On 7

Re: [fossil-users] Quiet mode for update and sync

2014-10-07 Thread Andy Bradford
Thus said David Mason on Thu, 02 Oct 2014 09:35:50 -0400: I want a script to run every 5 minutes and if there is any update, email me the update log. But I don't want email every 5 minutes that just says everything is up to date. After thinking about it a bit more, I realized all

Re: [fossil-users] Quiet mode for update and sync

2014-10-07 Thread Andy Bradford
Thus said Andy Bradford on 07 Oct 2014 00:21:48 -0600: fossil sync /dev/null fossil update -n | grep '^changes:' | grep -v 'None. Already up-to-date' { fossil update 21 | mail -s 'Fossil update' m...@he.re } Perhaps something that matches a positive would be better: fossil sync

Re: [fossil-users] Quiet mode for update and sync

2014-10-07 Thread David Mason
On 7 October 2014 02:30, Andy Bradford amb-sendok-1415255446.lmkmojimnoldkcbjb...@bradfords.org wrote: fossil sync /dev/null fossil update -n | grep '^changes:.*files modified\.' { fossil update 21 | mail -s 'Fossil update' m...@he.re } Best yet, although you actually want a -q switch on

Re: [fossil-users] Quiet mode for update and sync

2014-10-06 Thread Andy Bradford
Thus said David Mason on Sun, 05 Oct 2014 11:05:27 -0400: + if ( statusFlag ) fossil_exit(nUpdate==0); } Before you start using this in your own fork, you might want to consider if having the update_cmd() function exit at this point will cause problems if FOSSIL_ENABLE_TH1_HOOKS is

Re: [fossil-users] Quiet mode for update and sync

2014-10-06 Thread Ron W
On Sun, Oct 5, 2014 at 11:05 AM, David Mason dma...@ryerson.ca wrote: (I do updates via ssh) If you are only doing updates via ssh, why run a cron job every 5 minutes? You could make a wrapper script for Fossil that runs Fossil to perform the sync, then backgrounds itself so the ssh session

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread David Mason
On 3 October 2014 14:04, Andy Bradford amb-sendok-1414951486.goflecofghbmjnaaa...@bradfords.org wrote: Are you simply looking for a way to be notified via email when there are changes that have been updated into your working checkout? Yes. I want an email when a change happens, but not an

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Stephan Beal
On Sun, Oct 5, 2014 at 5:05 PM, David Mason dma...@ryerson.ca wrote: In the interests of getting into the code a bit, I looked at implementing this. Making it truly a quiet option was going to require fairly major surgery, but after a bit of thought, I realized that all I really needed was

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread David Mason
On 5 October 2014 12:41, Stephan Beal sgb...@googlemail.com wrote: On Sun, Oct 5, 2014 at 5:05 PM, David Mason dma...@ryerson.ca wrote: Gotta love users who provide patches :). :-) + if ( statusFlag ) fossil_exit(nUpdate==0); } As you mention, there might be legacy issues pending there,

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Stephan Beal
On Sun, Oct 5, 2014 at 7:52 PM, David Mason dma...@ryerson.ca wrote: On 5 October 2014 12:41, Stephan Beal sgb...@googlemail.com wrote: Another option comes to mind which would, i think, provide a one-call solution and might avoid major surgery: the ability to squelch output at the app

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Andy Bradford
Thus said David Mason on Sun, 05 Oct 2014 11:05:27 -0400: Absolutely. It should work fine and it's better than my original shell-only version. I don't really want to do it that way for a couple of reasons: 1) I don't want to *have* to be running a fossil server (I do updates via ssh);

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Andy Bradford
Thus said Stephan Beal on Sun, 05 Oct 2014 18:41:33 +0200: It still seems horribly inefficient, though, considering all the db-level work it does there, knowing it's going to roll back the transaction. Actually, at the moment, there isn't much inefficiency because it's all local.

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Andy Bradford
Thus said David Mason on Sun, 05 Oct 2014 13:52:45 -0400: Continuing to think about it, my issue is that I don't want to send empty emails, an a look at mail(1) suggests that: fossil update -m | mail -E -s some subject m...@he.re If you're using the scripted approach, just

Re: [fossil-users] Quiet mode for update and sync

2014-10-05 Thread Andy Bradford
Thus said Andy Bradford on 05 Oct 2014 23:18:01 -0600: On the other hand, the case of fossil update -s seems clear enough, just run the update and exit non-zero if no updates were made. By the way, I'm not not necessarily suggesting that this be done. At the moment, fossil update does exit

Re: [fossil-users] Quiet mode for update and sync

2014-10-03 Thread David Mason
Ah, yes; I forgot about autosync (I'm new to actually using fossil), but I don't think it's a flaw (see below). On 3 October 2014 01:21, Stephan Beal sgb...@googlemail.com wrote: On Thu, Oct 2, 2014 at 3:35 PM, David Mason dma...@ryerson.ca wrote: fossil update -q fossil update 21 | mail

Re: [fossil-users] Quiet mode for update and sync

2014-10-03 Thread Andy Bradford
Thus said David Mason on Thu, 02 Oct 2014 09:35:50 -0400: I want a script to run every 5 minutes and if there is any update, email me the update log. But I don't want email every 5 minutes that just says everything is up to date. I can figure out using file timestamps etc. if an

Re: [fossil-users] Quiet mode for update and sync

2014-10-03 Thread David Mason
On 3 October 2014 12:25, Andy Bradford amb-sendok-1414945537.ohnacbkbmfbammcpp...@bradfords.org wrote: Thus said David Mason on Thu, 02 Oct 2014 09:35:50 -0400: I want a script to run every 5 minutes and if there is any update, email me the update log. But I don't want email every 5

Re: [fossil-users] Quiet mode for update and sync

2014-10-03 Thread Andy Bradford
Thus said David Mason on Fri, 03 Oct 2014 12:49:17 -0400: 3) It seems like a lot more overhead, compared to a local run of fossil I'm not sure why you need to parse anything. Here is a low-overhead script that detects updates to a remote repository: #!/bin/sh OLD=$HOME/old.rss

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Ron W
On Thu, Oct 2, 2014 at 9:35 AM, David Mason dma...@ryerson.ca wrote: While I'm on fossil sync, is there a way to reset the sync source value? For whatever reason (actually because it was easier to update privileges on my laptop than my headless server) I copied a client fossil to the server

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread David Mason
On 2 October 2014 11:02, Ron W ronw.m...@gmail.com wrote: On Thu, Oct 2, 2014 at 9:35 AM, David Mason dma...@ryerson.ca wrote: While I'm on fossil sync, is there a way to reset the sync source value? I think, if you provide a URL when sync'ing, Fossil remembers that. That said, the script

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Goyo
2014-10-02 15:35 GMT+02:00 David Mason dma...@ryerson.ca: While I'm on fossil sync, is there a way to reset the sync source value? Is fossil remote-url what you want? Goyo ___ fossil-users mailing list fossil-users@lists.fossil-scm.org

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Stephan Beal
On Thu, Oct 2, 2014 at 7:02 PM, Goyo goyod...@gmail.com wrote: 2014-10-02 15:35 GMT+02:00 David Mason dma...@ryerson.ca: While I'm on fossil sync, is there a way to reset the sync source value? Is fossil remote-url what you want? That's the simplest solution, or... i believe what Ron

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Andy Goth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/2/2014 12:40 PM, David Mason wrote: Right, what I wanted to do was get rid of the remote-url. It turns out that if you say: fossil remote-utl '' it complains that it's invalid, but now it's off, so it no longer attempts to sync. Type:

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread David Mason
On 2 October 2014 15:04, Andy Goth andrew.m.g...@gmail.com wrote: Type: fossil remote-url off Ah, much cleaner! Thanks, missed that. ../Dave ___ fossil-users mailing list fossil-users@lists.fossil-scm.org

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Tomek Kott
Date: Thu, 2 Oct 2014 13:40:06 -0400 From: David Mason dma...@ryerson.ca To: Fossil SCM user's discussion fossil-users@lists.fossil-scm.org Subject: Re: [fossil-users] Quiet mode for update and sync Message-ID: CALFgxqD_Gg_2FtkSs=82r0vnvmkrctz-4lxnejefqp7dckn...@mail.gmail.com

Re: [fossil-users] Quiet mode for update and sync

2014-10-02 Thread Stephan Beal
On Thu, Oct 2, 2014 at 3:35 PM, David Mason dma...@ryerson.ca wrote: fossil update -q fossil update 21 | mail -s 'Fossil update' m...@he.re i've been mulling over this, and there's one fundamental flaw here: if auto-sync is on (which it is by default), then fossil does not know if