#!/usr/bin/env php loadOneWhere( 'callsign = %s', $matches[1]); if (!$repo) { throw new Exception("Unknown repository!"); } $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere( 'repositoryID = %d AND commitIdentifier = %s', $repo->getID(), $matches[2]); if (!$commit) { throw new Exception('Unknown commit.'); } switch ($repo->getVersionControlSystem()) { case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: $worker = new PhabricatorRepositoryGitCommitChangeParserWorker( $commit->getID()); break; case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: $worker = new PhabricatorRepositorySvnCommitChangeParserWorker( $commit->getID()); break; default: throw new Exception("Unknown repository type!"); } ExecFuture::pushEchoMode(true); $worker->doWork(); echo "Done.\n"; break; case '--help': case 'help': default: echo << Parse a single commit. EOHELP; exit(1); }