Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14079774
D20870.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
D20870.diff
View Options
diff --git a/src/land/ArcanistGitLandEngine.php b/src/land/ArcanistGitLandEngine.php
--- a/src/land/ArcanistGitLandEngine.php
+++ b/src/land/ArcanistGitLandEngine.php
@@ -139,9 +139,34 @@
$this->getTargetFullRef());
if ($err) {
- throw new Exception(
+ $this->writeWarn(
+ pht('TARGET'),
+ pht(
+ 'No local ref exists for branch "%s" in remote "%s", attempting '.
+ 'fetch...',
+ $this->getTargetOnto(),
+ $this->getTargetRemote()));
+
+ $api->execManualLocal(
+ 'fetch %s %s --',
+ $this->getTargetRemote(),
+ $this->getTargetOnto());
+
+ list($err) = $api->execManualLocal(
+ 'rev-parse --verify %s',
+ $this->getTargetFullRef());
+ if ($err) {
+ throw new Exception(
+ pht(
+ 'Branch "%s" does not exist in remote "%s".',
+ $this->getTargetOnto(),
+ $this->getTargetRemote()));
+ }
+
+ $this->writeInfo(
+ pht('FETCHED'),
pht(
- 'Branch "%s" does not exist in remote "%s".',
+ 'Fetched branch "%s" from remote "%s".',
$this->getTargetOnto(),
$this->getTargetRemote()));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:46 AM (17 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6778127
Default Alt Text
D20870.diff (1 KB)
Attached To
Mode
D20870: In "arc land", when "remote/onto" does not exist locally, try to fetch it before giving up
Attached
Detach File
Event Timeline
Log In to Comment