Exemple #1
0
 /**
  * Clone a repository, it inherits access
  * @param String forkName
  */
 public function forkShell($forkName)
 {
     $clone = new GitRepository();
     $clone->setName($forkName);
     $clone->setProject($this->getProject());
     $clone->setParent($this);
     $clone->setCreationDate(date('Y-m-d H:i:s'));
     $clone->setCreator($this->getCreator());
     $clone->setAccess($this->getAccess());
     $clone->setIsInitialized(1);
     $clone->setDescription('-- Default description --');
     $this->getBackend()->createFork($clone);
 }
Exemple #2
0
 private function _aGitRepoWith($user, $repo, $namespace, $backend, $scope)
 {
     $clone = new GitRepository();
     $clone->setCreator($user);
     $clone->setNamespace($namespace);
     $clone->setBackend($backend);
     $clone->setParent($repo);
     $clone->setScope($scope);
     $clone->setName($repo->getName());
     return $clone;
 }