I added implementations of the pre- and post-commit hooks for subversion which allows for permission checking (for the pre-commit hook) and automatic log updates (for the post-commit hook) to subversion repositories.

Here is the branch.

Comments

jpetso’s picture

Status: Active » Fixed

Awesome. Merged with only minimal differences:

  • No new-svnlib update because that's unused by your code and off-topic for this issue. I defer to sdboyer for everything regarding new-svnlib merges.
  • No implementation of hook_versioncontrol_is_account_authorized(), that's not supposed to be implemented by backends, at least not as basic functionality. Instead, I updated Version Control API itself to push the "Allow unauthorized commit access" option from the global to the per-repository scope, which is better for Version Control API on the whole and has the nice side effect that the tests don't need to mess around with a global setting (and pass in all cases).
  • preg_split() is not replaced by split() because the latter is deprecated. The speed win can't really be significant enough to make up for that.
  • The branch didn't enable the VERSIONCONTROL_CAPABILITY_COMMIT_MESSAGES flag in hook_versioncontrol_backends() that makes commit restriction settings appear on the repository edit form, so I did that myself.

As single remaining suggestion, I think we might be more future-proof if we split out the shared code from xsvn-config.php into a separate include file, because it's kinda non-trivial already and chances are higher than for the CVS backend that these functions will change in the future.

Anyways, congrats on the patchset, it's solid work and I appreciate your efforts to rewrite the commit history for better representativeness. Looking forward to further patches :D

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.