drop in Volker's post-receive hook from #15133
enable trac post-receive hook, with a few minor changes