[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1848393 - in /subversion/site: publish/.message-ids.tsv tools/haxx-url-to-message-id.sh

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 11 Dec 2018 08:16:10 +0000

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
Received on 2018-12-11 09:16:23 CET

This is an archived mail posted to the Subversion Dev mailing list.