Julian Foad wrote on Mon, Dec 10, 2018 at 18:23:00 +0000: > Daniel Shahaf wrote: > > > +++ subversion/site/publish/.message-ids.tsv Fri Dec 7 12:29:56 2018 > > > +# Message-ids of archived emails that are referenced by a svn.haxx.se > > > URL. > > > +# Generated by tools/haxx-url-to-message-id.sh on 2018-12-07 > > > > Could we run this periodically unattended? We could teach the svn-role > > bot to checkout the site source, run this script and commit the results. > > > > The cron job would be — > > > > fn=publish/.message-ids.tsv > > cd ~/src/svn/site > > svn up -q > > tools/haxx-url-to-message-id.sh > $fn > > svn ci -m "* $fn: Automatically regenerated" $fn > > I logged in to svn-qavm3 and added it to crontab of user 'svnsvn': >
Thanks for setting this up. > # Update our Haxx-URL-to-Message-Id map (a manual cron entry, for now) > 0 4 * * * fn=publish/.message-ids.tsv; cd ~/src/svn/site; svn up -q; > tools/haxx-url-to-message-id.sh > $fn; svn ci -m "* $fn: Automatically > regenerated" $fn > > More could be done, of course. > Robustness: teach it to only accumulate new entries, and not to wipe the file > when there's a network glitch. That's easy enough: just write 'set -e' at the start of the line, so any error aborts the script. (Or change all semicolons to double ampersands) > The other cron entries are managed by Puppet, so presumably this should be > too. Yes. Another nice to have improvement would be making the 'svn ci' invocation silent — by adding --quiet, or by running it under chronic(1) (from package 'moreutils') — so the people on the crontab's MAILTO list don't get emails for successful commits. Cheers, Daniel