Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15302652
D17949.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
932 B
Referenced Files
None
Subscribers
None
D17949.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17949: If the base commit for `arc patch` does not exist locally, try to fetch it
Attached
Detach File
Event Timeline
Log In to Comment