Differential D15986 Diff 38488 src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | try { | ||||
$repository->getDisplayName())); | $repository->getDisplayName())); | ||||
if ($is_git) { | if ($is_git) { | ||||
$this->executeGitCreate(); | $this->executeGitCreate(); | ||||
} else if ($is_hg) { | } else if ($is_hg) { | ||||
$this->executeMercurialCreate(); | $this->executeMercurialCreate(); | ||||
} else { | } else { | ||||
$this->executeSubversionCreate(); | $this->executeSubversionCreate(); | ||||
} | } | ||||
} else { | } | ||||
id(new DiffusionRepositoryClusterEngine()) | |||||
->setViewer($viewer) | |||||
->setRepository($repository) | |||||
->synchronizeWorkingCopyBeforeRead(); | |||||
if (!$repository->isHosted()) { | if (!$repository->isHosted()) { | ||||
$this->logPull( | $this->logPull( | ||||
pht( | pht( | ||||
'Updating the working copy for repository "%s".', | 'Updating the working copy for repository "%s".', | ||||
$repository->getDisplayName())); | $repository->getDisplayName())); | ||||
if ($is_git) { | if ($is_git) { | ||||
$this->verifyGitOrigin($repository); | $this->verifyGitOrigin($repository); | ||||
$this->executeGitUpdate(); | $this->executeGitUpdate(); | ||||
} else if ($is_hg) { | } else if ($is_hg) { | ||||
$this->executeMercurialUpdate(); | $this->executeMercurialUpdate(); | ||||
} | } | ||||
} | } | ||||
} | |||||
if ($repository->isHosted()) { | if ($repository->isHosted()) { | ||||
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 454 Lines • Show Last 20 Lines |