Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistMercurialLandEngine.php
Show First 20 Lines • Show All 1,234 Lines • ▼ Show 20 Lines | protected function reconcileLocalState( | ||||
$api->execxLocal( | $api->execxLocal( | ||||
'update -- %s', | 'update -- %s', | ||||
$update_marker); | $update_marker); | ||||
$state->discardLocalState(); | $state->discardLocalState(); | ||||
} | } | ||||
protected function didHoldChanges($into_commit) { | protected function didHoldChanges($into_commit, $branch_pruned) { | ||||
$log = $this->getLogEngine(); | $log = $this->getLogEngine(); | ||||
$local_state = $this->getLocalState(); | $local_state = $this->getLocalState(); | ||||
$message = pht( | $message = pht( | ||||
'Holding changes locally, they have not been pushed.'); | 'Holding changes locally, they have not been pushed.'); | ||||
list($head, $body, $tail_pass, $tail_fail) = $this->newPushCommands( | list($head, $body, $tail_pass, $tail_fail) = $this->newPushCommands( | ||||
$into_commit); | $into_commit); | ||||
Show All 10 Lines | echo tsprintf( | ||||
phutil_count($commands))); | phutil_count($commands))); | ||||
foreach ($commands as $command) { | foreach ($commands as $command) { | ||||
echo tsprintf('%>', csprintf('hg %Ls', $command)); | echo tsprintf('%>', csprintf('hg %Ls', $command)); | ||||
} | } | ||||
echo tsprintf("\n"); | echo tsprintf("\n"); | ||||
if ($branch_pruned) { | |||||
// No restore is possible if the user decided to prune the merged | |||||
// branches when using `--hold`. | |||||
return; | |||||
} | |||||
$restore_commands = $local_state->getRestoreCommandsForDisplay(); | $restore_commands = $local_state->getRestoreCommandsForDisplay(); | ||||
if ($restore_commands) { | if ($restore_commands) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"%s\n\n", | "%s\n\n", | ||||
pht( | pht( | ||||
'To go back to how things were before you ran "arc land", run '. | 'To go back to how things were before you ran "arc land", run '. | ||||
'these %s command(s):', | 'these %s command(s):', | ||||
phutil_count($restore_commands))); | phutil_count($restore_commands))); | ||||
Show All 16 Lines |