Index: src/applications/repository/engine/PhabricatorRepositoryPullEngine.php =================================================================== --- src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ src/applications/repository/engine/PhabricatorRepositoryPullEngine.php @@ -82,32 +82,29 @@ $this->executeSubversionCreate(); } } else { - if ($repository->isHosted()) { - if ($is_git) { - $this->installGitHook(); - } else if ($is_svn) { - $this->installSubversionHook(); - } else if ($is_hg) { - $this->installMercurialHook(); - } else { - $this->logPull( - pht( - "Repository '%s' is hosted, so Phabricator does not pull ". - "updates for it.", - $callsign)); - } - } else { + if (!$repository->isHosted()) { $this->logPull( pht( "Updating the working copy for repository '%s'.", $callsign)); if ($is_git) { $this->executeGitUpdate(); - } else { + } else if ($is_hg) { $this->executeMercurialUpdate(); } } } + + if ($repository->isHosted()) { + if ($is_git) { + $this->installGitHook(); + } else if ($is_svn) { + $this->installSubversionHook(); + } else if ($is_hg) { + $this->installMercurialHook(); + } + } + } catch (Exception $ex) { $this->abortPull( pht('Pull of "%s" failed: %s', $callsign, $ex->getMessage()),