Page MenuHomePhabricator

D17949.diff
No OneTemporary

D17949.diff

diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php
--- a/src/workflow/ArcanistPatchWorkflow.php
+++ b/src/workflow/ArcanistPatchWorkflow.php
@@ -430,6 +430,18 @@
$repository_api = $this->getRepositoryAPI();
$has_base_revision = $repository_api->hasLocalCommit(
$bundle->getBaseRevision());
+ if (!$has_base_revision) {
+ if ($repository_api instanceof ArcanistGitAPI) {
+ echo phutil_console_format(
+ "<bg:blue>** %s **</bg> %s\n",
+ pht('INFO'),
+ pht('Base commit is not in local repository; trying to fetch.'));
+ $repository_api->execManualLocal('fetch --quiet --all');
+ $has_base_revision = $repository_api->hasLocalCommit(
+ $bundle->getBaseRevision());
+ }
+ }
+
if ($this->canBranch() &&
($this->shouldBranch() ||
($this->shouldCommit() && $has_base_revision))) {

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 6, 7:20 PM (3 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7308962
Default Alt Text
D17949.diff (932 B)

Event Timeline