Differential D15790 Diff 38037 src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Show All 17 Lines | final class PhabricatorRepositoryPullEngine | ||||
extends PhabricatorRepositoryEngine { | extends PhabricatorRepositoryEngine { | ||||
/* -( Pulling Working Copies )--------------------------------------------- */ | /* -( Pulling Working Copies )--------------------------------------------- */ | ||||
public function pullRepository() { | public function pullRepository() { | ||||
$repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
$viewer = PhabricatorUser::getOmnipotentUser(); | |||||
$is_hg = false; | $is_hg = false; | ||||
$is_git = false; | $is_git = false; | ||||
$is_svn = false; | $is_svn = false; | ||||
$vcs = $repository->getVersionControlSystem(); | $vcs = $repository->getVersionControlSystem(); | ||||
switch ($vcs) { | switch ($vcs) { | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | try { | ||||
$this->executeGitUpdate(); | $this->executeGitUpdate(); | ||||
} else if ($is_hg) { | } else if ($is_hg) { | ||||
$this->executeMercurialUpdate(); | $this->executeMercurialUpdate(); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if ($repository->isHosted()) { | if ($repository->isHosted()) { | ||||
$repository->synchronizeWorkingCopyBeforeRead(); | id(new DiffusionRepositoryClusterEngine()) | ||||
->setViewer($viewer) | |||||
->setRepository($repository) | |||||
->synchronizeWorkingCopyBeforeRead(); | |||||
if ($is_git) { | if ($is_git) { | ||||
$this->installGitHook(); | $this->installGitHook(); | ||||
} else if ($is_svn) { | } else if ($is_svn) { | ||||
$this->installSubversionHook(); | $this->installSubversionHook(); | ||||
} else if ($is_hg) { | } else if ($is_hg) { | ||||
$this->installMercurialHook(); | $this->installMercurialHook(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 455 Lines • Show Last 20 Lines |