@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.

Don't try to synchronize repositories with no working copy

Summary:
Ref T4292. Sometimes, we may not have a working copy for a repository. The easiest way to get into this condition is to deactivate a repository.

We could try to clone + fetch in this case, but that's kind of complex, and there's an easy command that administrators can run manually. For now, just tell them to do that.

This affects the inactive repositories on `secure`, like rGITCOINS.

Test Plan: Removed working copy, got message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4292

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

+15 -1
+15 -1
src/applications/repository/storage/PhabricatorRepository.php
··· 2528 2528 2529 2529 private function synchronizeWorkingCopyFromBinding($binding) { 2530 2530 $fetch_uri = $this->getClusterRepositoryURIFromBinding($binding); 2531 + $local_path = $this->getLocalPath(); 2531 2532 2532 2533 if ($this->isGit()) { 2534 + if (!Filesystem::pathExists($local_path)) { 2535 + $device = AlmanacKeys::getLiveDevice(); 2536 + throw new Exception( 2537 + pht( 2538 + 'Repository "%s" does not have a working copy on this device '. 2539 + 'yet, so it can not be synchronized. Wait for the daemons to '. 2540 + 'construct one or run `bin/repository update %s` on this host '. 2541 + '("%s") to build it explicitly.', 2542 + $this->getDisplayName(), 2543 + $this->getMonogram(), 2544 + $device->getName())); 2545 + } 2546 + 2533 2547 $argv = array( 2534 2548 'fetch --prune -- %s %s', 2535 2549 $fetch_uri, ··· 2546 2560 ->setProtocol($fetch_uri->getProtocol()) 2547 2561 ->newFuture(); 2548 2562 2549 - $future->setCWD($this->getLocalPath()); 2563 + $future->setCWD($local_path); 2550 2564 2551 2565 $future->resolvex(); 2552 2566 }