Page MenuHomePhabricator

Support Mercurial pretxnchangegroup hooks
ClosedPublic

Authored by epriestley on Dec 2 2013, 11:37 PM.
Tags
None
Referenced Files
F13273139: D7685.diff
Fri, May 31, 1:37 AM
F13262822: D7685.id17350.diff
Mon, May 27, 4:06 AM
F13231996: D7685.id17353.diff
Tue, May 21, 12:56 AM
F13220444: D7685.id.diff
Sun, May 19, 1:29 AM
F13206367: D7685.diff
Wed, May 15, 8:02 AM
F13202935: D7685.diff
Tue, May 14, 11:19 PM
F13188008: D7685.diff
Sat, May 11, 4:54 AM
Unknown Object (File)
Tue, May 7, 7:07 AM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
T4189: Install commit hooks in hosted repositories
Commits
Restricted Diffusion Commit
rPf93c6985ad84: Support Mercurial pretxnchangegroup hooks
Summary

Ref T4189. Fixes T2066. Mercurial has a lot of hooks so I'm not 100% sure this is all we need to install (we may need separate hooks for tags/bookmarks) but it should cover most of what we're after at least.

Test Plan
  • bin/repository pull'd a Mercurial repo and got a hook install.
  • Pushed to a Mercurial repository over SSH and HTTP, with good/bad hooks. Saw hooks fire.

Diff Detail

Branch
hooks3
Lint
Lint Passed
SeverityLocationCodeMessage
Advicescripts/repository/commit_hook.php:38XHP16TODO Comment
Advicesrc/applications/diffusion/engine/DiffusionCommitHookEngine.php:81XHP16TODO Comment
Unit
Tests Passed

Event Timeline

src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
340

This is basically like "--bare" in Git, but should be much less problematic since the Mercurial bare and non-bare formats are almost identical. This is just a little cleaner/faster and saves a bit of disk space by not keeping a checked out working copy around when we don't actually need one.