Page MenuHomePhabricator

D15786.id38027.diff
No OneTemporary

D15786.id38027.diff

diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -2528,8 +2528,21 @@
private function synchronizeWorkingCopyFromBinding($binding) {
$fetch_uri = $this->getClusterRepositoryURIFromBinding($binding);
+ $local_path = $this->getLocalPath();
if ($this->isGit()) {
+ if (!Filesystem::pathExists($local_path)) {
+ $device = AlmanacKeys::getLiveDevice();
+ throw new Exception(
+ pht(
+ 'Repository "%s" does not have a working copy on this device '.
+ 'yet, so it can not be synchronized. Wait for the daemons to '.
+ 'construct one or run `bin/repository update %s` on this host '.
+ '("%s") to build it explicitly.',
+ $this->getDisplayName(),
+ $device->getName()));
+ }
+
$argv = array(
'fetch --prune -- %s %s',
$fetch_uri,
@@ -2546,7 +2559,7 @@
->setProtocol($fetch_uri->getProtocol())
->newFuture();
- $future->setCWD($this->getLocalPath());
+ $future->setCWD($local_path);
$future->resolvex();
}

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 1:07 PM (4 w, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274872
Default Alt Text
D15786.id38027.diff (1 KB)

Event Timeline