Support bookmark hook operations in Mercurial

Summary: Ref T4195. Turns bookmark mutations in Mercurial into log objects.

Test Plan:
Pushed a pile of bookmarks and got logs:

{F89313}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7764
This commit is contained in:
epriestley
2013-12-17 08:34:30 -08:00
parent 6f3a99eb39
commit 74251b3636
4 changed files with 129 additions and 10 deletions

View File

@@ -36,9 +36,10 @@ if ($repository->isGit() || $repository->isHg()) {
pht('usage: %s should be defined!', DiffusionCommitHookEngine::ENV_USER));
}
// TODO: If this is a Mercurial repository, the hook we're responding to
// is available in $argv[2]. It's unclear if we actually need this, or if
// we can block all actions we care about with just pretxnchangegroup.
if ($repository->isHg()) {
// We respond to several different hooks in Mercurial.
$engine->setMercurialHook($argv[2]);
}
} else if ($repository->isSVN()) {
// NOTE: In Subversion, the entire environment gets wiped so we can't read