Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistGitLandEngine.php
Show First 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | private function getAuthorAndDate($commit) { | ||||
list($date, $author, $email) = explode("\n", $info, 3); | list($date, $author, $email) = explode("\n", $info, 3); | ||||
return array( | return array( | ||||
"$author <{$email}>", | "$author <{$email}>", | ||||
$date, | $date, | ||||
); | ); | ||||
} | } | ||||
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(); | ||||
if ($this->getIsGitPerforce()) { | if ($this->getIsGitPerforce()) { | ||||
$message = pht( | $message = pht( | ||||
'Holding changes locally, they have not been submitted.'); | 'Holding changes locally, they have not been submitted.'); | ||||
$push_command = csprintf( | $push_command = csprintf( | ||||
Show All 14 Lines | echo tsprintf( | ||||
pht('HOLD CHANGES'), | pht('HOLD CHANGES'), | ||||
$message); | $message); | ||||
echo tsprintf( | echo tsprintf( | ||||
"%s\n\n%>\n", | "%s\n\n%>\n", | ||||
pht('To push changes manually, run this command:'), | pht('To push changes manually, run this command:'), | ||||
$push_command); | $push_command); | ||||
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 20 Lines • Show All 879 Lines • Show Last 20 Lines |