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

Re: [PATCH] hook script for log message newline enforcement

From: <kfogel_at_collab.net>
Date: 2006-03-03 20:34:49 CET

"Justin Erenkrantz" <justin@erenkrantz.com> writes:
> Yikes. Until you explained it to me on IRC, I had no clue what it's doing.
> (It's attempting to ensure that we always catch every revision while the
> script is running.)
> However, the only real way to prevent this is to install the pre-commit hook
> and then run the all-revs version of it. If you did the reverse, there's
> always a race condition that you'd miss some revisions - in between the time
> you ran all-revs and installed the pre-commit hook.
> So, it should be something like:
> elif all_revs:
> for this_rev in range(0, svn.fs.svn_fs_youngest_rev(fs) + 1):
> fix_up_rev(fs, this_rev)
> It's also much shorter and easier to understand too. ;-) -- justin


As per later IRC discussion, I'll put a comment there explaining
what's going on. I do like being as bulletproof as possible (if
that's a meaningful concept), although you're right about the race
condition still being there if the admin does things in the wrong

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 3 22:22:22 2006

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