diff --git a/src/applications/repository/daemon/pulllocal/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/pulllocal/PhabricatorRepositoryPullLocalDaemon.php index f7f00ed4a3..337e367ee6 100644 --- a/src/applications/repository/daemon/pulllocal/PhabricatorRepositoryPullLocalDaemon.php +++ b/src/applications/repository/daemon/pulllocal/PhabricatorRepositoryPullLocalDaemon.php @@ -1,68 +1,70 @@ loadRepository(); $expected_type = $this->getSupportedRepositoryType(); $repo_type = $repository->getVersionControlSystem(); if ($repo_type != $expected_type) { $repo_type_name = PhabricatorRepositoryType::getNameForRepositoryType( $repo_type); $expected_type_name = PhabricatorRepositoryType::getNameForRepositoryType( $expected_type); $repo_name = $repository->getName().' ('.$repository->getCallsign().')'; throw new Exception( "This daemon pulls '{$expected_type_name}' repositories, but the ". "repository '{$repo_name}' is a '{$repo_type_name}' repository."); } $tracked = $repository->isTracked(); if (!$tracked) { throw new Exception("Tracking is not enabled for this repository."); } $local_path = $repository->getDetail('local-path'); if (!$local_path) { throw new Exception("No local path is available for this repository."); } while (true) { if (!Filesystem::pathExists($local_path)) { + printf("Creating new directory %s for repo %s\n", + $local_path, $repository->getName()); execx('mkdir -p %s', dirname($local_path)); $this->executeCreate($repository, $local_path); } else { $this->executeUpdate($repository, $local_path); } $this->sleep($repository->getDetail('pull-frequency', 15)); } } }