mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-11 15:21:03 +01:00
Merge branch 'amend_revision'
This commit is contained in:
commit
f794b50b0e
1 changed files with 18 additions and 7 deletions
|
@ -90,7 +90,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getArgument('revision')) {
|
if ($this->getArgument('revision')) {
|
||||||
$revision_id = $this->getArgument('revision');
|
$revision_id = $this->normalizeRevisionID($this->getArgument('revision'));
|
||||||
} else {
|
} else {
|
||||||
$log = $repository_api->getGitCommitLog();
|
$log = $repository_api->getGitCommitLog();
|
||||||
$parser = new ArcanistDiffParser();
|
$parser = new ArcanistDiffParser();
|
||||||
|
@ -117,12 +117,23 @@ EOTEXT
|
||||||
// revision in it. Maybe this is worth restoring?
|
// revision in it. Maybe this is worth restoring?
|
||||||
|
|
||||||
$conduit = $this->getConduit();
|
$conduit = $this->getConduit();
|
||||||
|
try {
|
||||||
$message = $conduit->callMethodSynchronous(
|
$message = $conduit->callMethodSynchronous(
|
||||||
'differential.getcommitmessage',
|
'differential.getcommitmessage',
|
||||||
array(
|
array(
|
||||||
'revision_id' => $revision_id,
|
'revision_id' => $revision_id,
|
||||||
'edit' => false,
|
'edit' => false,
|
||||||
));
|
)
|
||||||
|
);
|
||||||
|
} catch (ConduitClientException $ex) {
|
||||||
|
if (strpos($ex->getMessage(), 'ERR_NOT_FOUND') === false) {
|
||||||
|
throw $ex;
|
||||||
|
} else {
|
||||||
|
throw new ArcanistUsageException(
|
||||||
|
"Revision D{$revision_id} does not exist."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_show) {
|
if ($is_show) {
|
||||||
echo $message."\n";
|
echo $message."\n";
|
||||||
|
|
Loading…
Reference in a new issue