Page MenuHomePhabricator

D20870.diff
No OneTemporary

D20870.diff

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

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)

Event Timeline