Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
Show First 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | if ($this->shouldOnlyCreateDiff()) { | ||||
array( | array( | ||||
'revision_id' => $result_id, | 'revision_id' => $result_id, | ||||
)); | )); | ||||
if ($this->shouldAmend()) { | if ($this->shouldAmend()) { | ||||
$repository_api = $this->getRepositoryAPI(); | $repository_api = $this->getRepositoryAPI(); | ||||
if ($repository_api->supportsAmend()) { | if ($repository_api->supportsAmend()) { | ||||
echo pht('Updating commit message...')."\n"; | echo pht('Updating commit message...')."\n"; | ||||
$repository_api->amendCommit($revised_message); | $repository_api->amendCommit($this, $revised_message); | ||||
} else { | } else { | ||||
echo pht( | echo pht( | ||||
'Commit message was not amended. Amending commit message is '. | 'Commit message was not amended. Amending commit message is '. | ||||
'only supported in git and hg (version 2.2 or newer)'); | 'only supported in git and hg (version 2.2 or newer)'); | ||||
} | } | ||||
} | } | ||||
echo pht('Created a new Differential revision:')."\n"; | echo pht('Created a new Differential revision:')."\n"; | ||||
▲ Show 20 Lines • Show All 943 Lines • ▼ Show 20 Lines | while (!$done) { | ||||
$this->shouldAmend()); | $this->shouldAmend()); | ||||
} else { | } else { | ||||
$should_amend = false; | $should_amend = false; | ||||
} | } | ||||
if ($should_amend) { | if ($should_amend) { | ||||
$wrote = (rtrim($old_message) != rtrim($template)); | $wrote = (rtrim($old_message) != rtrim($template)); | ||||
if ($wrote) { | if ($wrote) { | ||||
$repository_api->amendCommit($template); | $repository_api->amendCommit($this, $template); | ||||
$where = pht('commit message'); | $where = pht('commit message'); | ||||
} | } | ||||
} else { | } else { | ||||
$wrote = $this->writeScratchFile('create-message', $template); | $wrote = $this->writeScratchFile('create-message', $template); | ||||
$where = "'".$this->getReadableScratchFilePath('create-message')."'"; | $where = "'".$this->getReadableScratchFilePath('create-message')."'"; | ||||
} | } | ||||
try { | try { | ||||
▲ Show 20 Lines • Show All 1,377 Lines • Show Last 20 Lines |