I just noticed the hook script templates had inconsistent text: {pre/post-lock/unlock} lacked the "The hook program runs in an empty environment..." (HOOKS_ENVIRONMENT_TEXT) and "For more examples..." (PREWRITTEN_HOOKS_TEXT) sections.
{pre/post-revprop-change} lacked "The default working directory [is undefined...]". r1658926 fixes the inconsistencies, factoring out the common text from all nine templates. - Julian