Page MenuHomePhabricator

D15786.diff
No OneTemporary

D15786.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,22 @@
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(),
+ $this->getMonogram(),
+ $device->getName()));
+ }
+
$argv = array(
'fetch --prune -- %s %s',
$fetch_uri,
@@ -2546,7 +2560,7 @@
->setProtocol($fetch_uri->getProtocol())
->newFuture();
- $future->setCWD($this->getLocalPath());
+ $future->setCWD($local_path);
$future->resolvex();
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 4:00 AM (8 h, 44 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6912725
Default Alt Text
D15786.diff (1 KB)

Event Timeline