Page MenuHomePhabricator

Support SVN pre-commit hoooks
ClosedPublic

Authored by epriestley on Dec 2 2013, 10:32 PM.
Tags
None
Referenced Files
F18803295: D7683.id.diff
Fri, Oct 17, 10:31 PM
F18791216: D7683.diff
Thu, Oct 16, 6:09 AM
F18790458: D7683.id.diff
Wed, Oct 15, 2:41 PM
F18764467: D7683.id17352.diff
Tue, Oct 7, 6:13 AM
F18646695: D7683.diff
Sep 19 2025, 10:48 AM
F18632439: D7683.id17348.diff
Sep 16 2025, 5:58 PM
F18589478: D7683.diff
Sep 12 2025, 3:27 AM
F18589476: D7683.diff
Sep 12 2025, 3:26 AM
Subscribers

Details

Summary

Ref T4189. This adds SVN support, which was a little more messy than I though. Principally, we can not use PHABRICATOR_USER for Subversion, because it strips away the entire environment for "security reasons".

Instead, use --tunnel-user plus svnlook author to figure out the author.

Also fix "ssh://" clone URIs, which needs to be "svn+ssh://".

Test Plan
  • Made SVN commits through the hook.
  • Made Git commits, too, to make sure I didn't break anything.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley updated this revision to Unknown Object (????).Dec 2 2013, 10:33 PM
  • Fix argument order in an exception message.

cool, just an inline about how it works

scripts/repository/commit_hook.php
27โ€“32

so when does this check get done now?

scripts/repository/commit_hook.php
27โ€“32

We'll never get here if the user doesn't have PUSH -- they'll be rejected as early as possible, before they send any data (in the case of SVN, before they send more than a few frames of data).

(I'll probably put this check back into the HookEngine just to be extra safe, though.)