Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistAmendWorkflow.php
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | if ($revision_symbol === null) { | ||||
$revision_symbol)); | $revision_symbol)); | ||||
} | } | ||||
} | } | ||||
if (!$is_show) { | if (!$is_show) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"%s\n\n%s\n", | "%s\n\n%s\n", | ||||
pht('Amending commit message to reflect revision:'), | pht('Amending commit message to reflect revision:'), | ||||
$revision_ref->newDisplayRef()); | $revision_ref->newRefView()); | ||||
$this->confirmAmendAuthor($revision_ref); | $this->confirmAmendAuthor($revision_ref); | ||||
$this->confirmAmendNotFound($revision_ref, $state_ref); | $this->confirmAmendNotFound($revision_ref, $state_ref); | ||||
} | } | ||||
$this->loadHardpoints( | $this->loadHardpoints( | ||||
$revision_ref, | $revision_ref, | ||||
ArcanistRevisionRef::HARDPOINT_COMMITMESSAGE); | ArcanistRevisionRef::HARDPOINT_COMMITMESSAGE); | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | if (!$revisions) { | ||||
'to specify which revision you want to amend.')); | 'to specify which revision you want to amend.')); | ||||
} | } | ||||
if (count($revisions) > 1) { | if (count($revisions) > 1) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"%!\n%W\n\n%B\n", | "%!\n%W\n\n%B\n", | ||||
pht('MULTIPLE REVISIONS IN WORKING COPY'), | pht('MULTIPLE REVISIONS IN WORKING COPY'), | ||||
pht('More than one revision was found in the working copy:'), | pht('More than one revision was found in the working copy:'), | ||||
mpull($revisions, 'newDisplayRef')); | mpull($revisions, 'newRefView')); | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'Use "--revision <id>" to specify which revision you want '. | 'Use "--revision <id>" to specify which revision you want '. | ||||
'to amend.')); | 'to amend.')); | ||||
} | } | ||||
return head($revisions); | return head($revisions); | ||||
Show All 23 Lines | echo tsprintf( | ||||
pht( | pht( | ||||
'You are amending the working copy using information from '. | 'You are amending the working copy using information from '. | ||||
'a revision you are not the author of.'), | 'a revision you are not the author of.'), | ||||
"\n\n", | "\n\n", | ||||
pht( | pht( | ||||
'The author of this revision (%s) is:', | 'The author of this revision (%s) is:', | ||||
$revision_ref->getMonogram()), | $revision_ref->getMonogram()), | ||||
), | ), | ||||
$author_ref->newDisplayRef()); | $author_ref->newRefView()); | ||||
$prompt = pht( | $prompt = pht( | ||||
'Amend working copy using revision owned by %s?', | 'Amend working copy using revision owned by %s?', | ||||
$author_ref->getMonogram()); | $author_ref->getMonogram()); | ||||
$this->getPrompt('arc.amend.author') | $this->getPrompt('arc.amend.author') | ||||
->setQuery($prompt) | ->setQuery($prompt) | ||||
->execute(); | ->execute(); | ||||
Show All 34 Lines |