mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Throw a helpful message when users run "arc diff --raw --update".
Summary: We crash and burn right now, trying to launch an interactive editor against a non-tty stdin. Raise a helpful error message instead. Test Plan: Will run "arc diff --raw --update". Reviewers: btrahan, yairlivne Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1949
This commit is contained in:
parent
4e888458d7
commit
d516f39bf3
1 changed files with 9 additions and 8 deletions
|
@ -92,16 +92,10 @@ EOTEXT
|
||||||
return array(
|
return array(
|
||||||
'message' => array(
|
'message' => array(
|
||||||
'short' => 'm',
|
'short' => 'm',
|
||||||
'supports' => array(
|
|
||||||
'git',
|
|
||||||
),
|
|
||||||
'nosupport' => array(
|
|
||||||
'svn' => 'Edit revisions via the web interface when using SVN.',
|
|
||||||
),
|
|
||||||
'param' => 'message',
|
'param' => 'message',
|
||||||
'help' =>
|
'help' =>
|
||||||
"When updating a revision under git, use the specified message ".
|
"When updating a revision, use the specified message instead of ".
|
||||||
"instead of prompting.",
|
"prompting.",
|
||||||
),
|
),
|
||||||
'message-file' => array(
|
'message-file' => array(
|
||||||
'short' => 'F',
|
'short' => 'F',
|
||||||
|
@ -1472,6 +1466,13 @@ EOTEXT
|
||||||
return $comments;
|
return $comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->getArgument('raw')) {
|
||||||
|
throw new ArcanistUsageException(
|
||||||
|
"When using '--raw' to update a revision, specify an update message ".
|
||||||
|
"with '--message'. (Normally, we'd launch an editor to ask you for a ".
|
||||||
|
"message, but can not do that because stdin is a diff source.)");
|
||||||
|
}
|
||||||
|
|
||||||
// When updating a revision using git without specifying '--message', try
|
// When updating a revision using git without specifying '--message', try
|
||||||
// to prefill with the message in HEAD if it isn't a template message. The
|
// to prefill with the message in HEAD if it isn't a template message. The
|
||||||
// idea is that if you do:
|
// idea is that if you do:
|
||||||
|
|
Loading…
Reference in a new issue