Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15472241
D8381.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8381.id.diff
View Options
diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php
--- a/src/workflow/ArcanistLandWorkflow.php
+++ b/src/workflow/ArcanistLandWorkflow.php
@@ -701,19 +701,21 @@
// Collapse just the landing branch onto master.
// Leave its children on the original branch.
- $err = $repository_api->execPassthru(
- 'rebase --collapse --keep --logfile %s -r %s -d %s',
- $this->messageFile,
- $branch_range,
- $this->onto);
+ if ($branch_root !== $branch_rev_id) {
+ $err = $repository_api->execPassthru(
+ 'rebase --collapse --keep --logfile %s -r %s -d %s',
+ $this->messageFile,
+ $branch_range,
+ $this->onto);
- if ($err) {
- $repository_api->execManualLocal(
- 'rebase --abort');
- $this->restoreBranch();
- throw new ArcanistUsageException(
- "Squashing the commits under {$this->branch} failed. ".
- "Manually squash your commits and run 'arc land' again.");
+ if ($err) {
+ $repository_api->execManualLocal(
+ 'rebase --abort');
+ $this->restoreBranch();
+ throw new ArcanistUsageException(
+ "Squashing the commits under {$this->branch} failed. ".
+ "Manually squash your commits and run 'arc land' again.");
+ }
}
if ($repository_api->isBookmark($this->branch)) {
@@ -734,7 +736,7 @@
// check if the branch had children
list($output) = $repository_api->execxLocal(
"log -r %s --template %s",
- hgsprintf("children(%s)", $this->branch),
+ hgsprintf("children(%s) - children(%s)", $this->branch, $this->onto),
'{node}\n');
$child_branch_roots = phutil_split_lines($output, false);
@@ -985,9 +987,11 @@
$this->branch,
$common_ancestor));
- $repository_api->execxLocal(
- '--config extensions.mq= strip -r %s',
- $branch_root);
+ if ($branch_root !== '') {
+ $repository_api->execxLocal(
+ '--config extensions.mq= strip -r %s',
+ $branch_root);
+ }
if ($repository_api->isBookmark($this->branch)) {
$repository_api->execxLocal(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 6, 11:58 AM (3 w, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7608376
Default Alt Text
D8381.id.diff (2 KB)
Attached To
Mode
D8381: [arc][hg] make `land` not fail for landinng middle commits
Attached
Detach File
Event Timeline
Log In to Comment