Commit + Herald integration.

This commit is contained in:
epriestley
2011-04-04 14:12:20 -07:00
parent 06ae6e488b
commit cc66c4890d
12 changed files with 33 additions and 18 deletions

View File

@@ -33,6 +33,7 @@ $conf['phabricator.env'] = $env;
phutil_require_module('phabricator', 'infrastructure/env');
PhabricatorEnv::setEnvConfig($conf);
phutil_load_library('arcanist/src');
foreach (PhabricatorEnv::getEnvConfig('load-libraries') as $library) {
phutil_load_library($library);

View File

@@ -26,9 +26,3 @@ if (!@constant('__LIBPHUTIL__')) {
}
phutil_load_library(dirname(__FILE__).'/../src/');
phutil_require_module('phutil', 'symbols');
function __autoload($class) {
PhutilSymbolLoader::loadClass($class);
}

View File

@@ -22,7 +22,7 @@ require_once $root.'/scripts/__init_script__.php';
require_once $root.'/scripts/__init_env__.php';
if (empty($argv[1])) {
echo "usage: parse_one_commit.php <commit_name>\n";
echo "usage: parse_one_commit.php <commit_name> [--herald]\n";
die(1);
}
@@ -72,6 +72,10 @@ switch ($repo->getVersionControlSystem()) {
throw new Exception("Unknown repository type!");
}
if (isset($argv[2]) && $argv[2] == '--herald') {
$workers[] = new PhabricatorRepositoryCommitHeraldWorker($spec);
}
ExecFuture::pushEchoMode(true);
foreach ($workers as $worker) {