1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

In "arc land", rebase branches in natural order

Summary: Ref T13546. When "arc land" performs cascading rebases, do them in "feature1", "feature2", etc., order so they're easier to follow. The outcome is not dependent on execution order.

Test Plan: Landed a change which cascaded many other branches, saw more comprehensible update order.

Maniphest Tasks: T13546

Differential Revision: https://secure.phabricator.com/D21320
This commit is contained in:
epriestley 2020-06-05 12:15:25 -07:00
parent 68f28a1718
commit 25afb93f7a
3 changed files with 17 additions and 1 deletions

View file

@ -103,6 +103,11 @@ final class ArcanistGitLandEngine
}
}
// Sort the result so that branches are processed in natural order.
$names = array_keys($result);
natcasesort($names);
$result = array_select_keys($result, $names);
return $result;
}

View file

@ -140,6 +140,15 @@ abstract class ArcanistLandEngine extends Phobject {
return $this->shouldKeep;
}
final public function setStrategyArgument($strategy_argument) {
$this->strategyArgument = $strategy_argument;
return $this;
}
final public function getStrategyArgument() {
return $this->strategyArgument;
}
final public function setStrategy($strategy) {
$this->strategy = $strategy;
return $this;

View file

@ -2357,11 +2357,13 @@ abstract class ArcanistWorkflow extends Phobject {
$prompts = $this->newPrompts();
assert_instances_of($prompts, 'ArcanistPrompt');
// TODO: Move this somewhere modular.
$prompts[] = $this->newPrompt('arc.state.stash')
->setDescription(
pht(
'Prompts the user to stash changes and continue when the '.
'working copy has untracked, uncommitted. or unstaged '.
'working copy has untracked, uncommitted, or unstaged '.
'changes.'));
// TODO: Swap to ArrayCheck?