本文整理汇总了PHP中GitRepository::canMigrateToGerrit方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::canMigrateToGerrit方法的具体用法?PHP GitRepository::canMigrateToGerrit怎么用?PHP GitRepository::canMigrateToGerrit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitRepository
的用法示例。
在下文中一共展示了GitRepository::canMigrateToGerrit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: migrateToGerrit
/**
*
* @param GitRepository $repository
* @param int $remote_server_id the id of the server to which we want to migrate
* @param Boolean $migrate_access_right if the acess right will be migrated or not
* @param int $gerrit_template_id the id of template if any chosen
*/
public function migrateToGerrit(GitRepository $repository, $remote_server_id, $gerrit_template_id)
{
if ($repository->canMigrateToGerrit()) {
try {
$this->gerrit_server_factory->getServerById($remote_server_id);
$this->git_system_event_manager->queueMigrateToGerrit($repository, $remote_server_id, $gerrit_template_id);
$this->history_dao->groupAddHistory("git_repo_to_gerrit", $repository->getName(), $repository->getProjectId());
} catch (Exception $e) {
$this->logger->log($e->getMessage(), Feedback::ERROR);
}
}
}
示例2: itIsMigratableIfItHasAlreadyBeenAGerritRepoInThePastAndRemoteProjectIsDeleted
public function itIsMigratableIfItHasAlreadyBeenAGerritRepoInThePastAndRemoteProjectIsDeleted()
{
$repo = new GitRepository();
$repo->setBackendType(GitDao::BACKEND_GITOLITE);
$repo->setRemoteServerDisconnectDate(12345677890);
$repo->setRemoteProjectDeletionDate(12345677890);
$repo->setRemoteServerId(4154);
$this->assertTrue($repo->canMigrateToGerrit());
}