Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14012010
D15786.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15786.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 2, 6:53 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714527
Default Alt Text
D15786.diff (1 KB)
Attached To
Mode
D15786: Don't try to synchronize repositories with no working copy
Attached
Detach File
Event Timeline
Log In to Comment