当前位置: 首页>>代码示例>>PHP>>正文


PHP GitRepository::isMigratedToGerrit方法代码示例

本文整理汇总了PHP中GitRepository::isMigratedToGerrit方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::isMigratedToGerrit方法的具体用法?PHP GitRepository::isMigratedToGerrit怎么用?PHP GitRepository::isMigratedToGerrit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GitRepository的用法示例。


在下文中一共展示了GitRepository::isMigratedToGerrit方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getContent

 public function getContent()
 {
     switch ($this->project_creator_status->getStatus($this->repository)) {
         case Git_Driver_Gerrit_ProjectCreatorStatus::QUEUE:
             return $this->getRemoteRepositoryInfoOnGoing();
         case Git_Driver_Gerrit_ProjectCreatorStatus::DONE:
             return $this->getRemoteRepositoryInfoDone();
         case Git_Driver_Gerrit_ProjectCreatorStatus::ERROR:
             return $this->getRemoteRepositoryInfoError();
         default:
             if ($this->repository->isMigratedToGerrit()) {
                 return $this->getRemoteRepositoryInfoDone();
             }
             return '';
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:16,代码来源:ContentGerrit.php

示例2: displayAccessControl

 /**
  * Display access control management for gitolite backend
  *
  * @param Integer $project_id Project Id, to manage permissions when performing a cross project fork
  *
  * @return String
  */
 public function displayAccessControl($project_id = null)
 {
     $project = $project_id ? ProjectManager::instance()->getProject($project_id) : $this->repository->getProject();
     $renderer = TemplateRendererFactory::build()->getRenderer(dirname(GIT_BASE_DIR) . '/templates');
     $presenter = new GitPresenters_AccessControlPresenter($this->repository->isMigratedToGerrit() ? true : false, 'repo_access[' . Git::PERM_READ . ']', 'repo_access[' . Git::PERM_WRITE . ']', 'repo_access[' . Git::PERM_WPLUS . ']', $this->getOptions($project, Git::PERM_READ), $this->getOptions($project, Git::PERM_WRITE), $this->getOptions($project, Git::PERM_WPLUS));
     return $renderer->renderToString('access-control', $presenter);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:GitForkPermissionsManager.class.php

示例3: getAccessURLs

 private function getAccessURLs()
 {
     $urls = $this->repository->getAccessURL();
     if ($this->repository->isMigratedToGerrit()) {
         $gerrit_user = $this->gerrit_usermanager->getGerritUser($this->current_user);
         $gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()];
         $driver = $this->driver_factory->getDriver($gerrit_server);
         $gerrit_project = $driver->getGerritProjectName($this->repository);
         $clone_url = $gerrit_server->getEndUserCloneUrl($gerrit_project, $gerrit_user);
         $this->prependGerritCloneURL($urls, $clone_url);
     }
     return $urls;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:13,代码来源:Content.class.php

示例4: checkRepoValidity

 /**
  *
  * @param GitRepository $git_repo
  * @param Project $project
  * @throws Git_ProjectNotFoundException
  * @throws GitRepoNotFoundException
  * @throws GitRepoNotInProjectException
  * @throws GitRepoNotOnGerritException
  */
 private function checkRepoValidity($git_repo, $project)
 {
     if ($project->isError()) {
         throw new Git_ProjectNotFoundException('unable to get config', 404);
     }
     if (!$git_repo) {
         throw new GitRepoNotFoundException('unable to get config', 404);
     }
     if (!$git_repo->belongsToProject($project)) {
         throw new GitRepoNotInProjectException('unable to get config', 403);
     }
     if (!$git_repo->isMigratedToGerrit()) {
         throw new GitRepoNotOnGerritException('unable to get config', 500);
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:24,代码来源:GitActions.class.php

示例5: itIsNotMigratedIfItWasDisconnected

 public function itIsNotMigratedIfItWasDisconnected()
 {
     $repository = new GitRepository();
     $repository->setDeletionDate(null);
     $repository->setRemoteServerDisconnectDate(12345677890);
     $repository->setRemoteServerId(1);
     $this->assertFalse($repository->isMigratedToGerrit());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:GitRepositoryTest.php

示例6: isMigrationToGerritCompletedWithSuccess

 private function isMigrationToGerritCompletedWithSuccess(GitRepository $repository)
 {
     return $repository->isMigratedToGerrit() && $this->gerrit_status->getStatus($repository) === Git_Driver_Gerrit_ProjectCreatorStatus::DONE;
 }
开发者ID:blestab,项目名称:tuleap,代码行数:4,代码来源:ConfigPermissionsSerializer.class.php


注:本文中的GitRepository::isMigratedToGerrit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。