@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve behavior for not-yet-created non-cluster repositories

Summary: Fixes T10815. We already recovered reasonably from this for cluster repositories, but not for non-cluster repositories.

Test Plan:
- Viewed cluster and non-cluster empty Git repository.
- Viewed cluster and non-cluster empty Mercurial repository.
- Viewed cluster and non-clsuter empty hosted SVN repository.
- Viewed cluster and non-cluster empty observed SVN repository.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10815

Differential Revision: https://secure.phabricator.com/D15878

+14
+5
src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
··· 31 31 return array(); 32 32 } 33 33 34 + $repository = $this->getRepository(); 35 + if (!$repository->hasLocalWorkingCopy()) { 36 + return array(); 37 + } 38 + 34 39 switch ($this->getRepository()->getVersionControlSystem()) { 35 40 case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: 36 41 $result = $this->resolveGitRefs();
+9
src/applications/repository/storage/PhabricatorRepository.php
··· 1477 1477 return false; 1478 1478 } 1479 1479 1480 + public function hasLocalWorkingCopy() { 1481 + try { 1482 + self::assertLocalExists(); 1483 + return true; 1484 + } catch (Exception $ex) { 1485 + return false; 1486 + } 1487 + } 1488 + 1480 1489 /** 1481 1490 * Raise more useful errors when there are basic filesystem problems. 1482 1491 */