'hg',
),
),
+ 'verbatim' => array(
+ 'help' => 'Try to use the working copy commit message verbatim when '.
+ 'creating a revision, without prompting to edit it.',
+ 'supports' => array(
+ 'hg',
+ 'git',
+ ),
+ 'conflicts' => array(
+ 'use-commit-message' => true,
+ 'update' => true,
+ 'only' => true,
+ 'preview' => true,
+ 'raw' => true,
+ 'raw-command' => true,
+ 'message' => true,
+ 'message-file' => true,
+ ),
+ ),
'*' => 'paths',
);
}
return true;
}
- $repository_api = $this->getRepositoryAPI();
- if ($repository_api instanceof ArcanistSubversionAPI) {
- return true;
- }
-
- if ($repository_api instanceof ArcanistMercurialAPI) {
- return true;
- }
-
if ($this->isHistoryImmutable()) {
return true;
}
$is_update = $revision['id'];
} else {
throw new ArcanistUsageException(
- "There are several revisions in the specified commit range:\n\n".
+ "There are several revisions which match the working copy:\n\n".
$this->renderRevisionList($revisions)."\n".
"Use '--update' to choose one, or '--create' to create a new ".
"revision.");
}
$done = false;
+ $first = true;
while (!$done) {
$template = rtrim($template)."\n\n";
foreach ($issues as $issue) {
}
$template .= "\n";
- $new_template = id(new PhutilInteractiveEditor($template))
- ->setName('new-commit')
- ->editInteractively();
+ if ($first && $this->getArgument('verbatim') && !$template_is_default) {
+ $new_template = $template;
+ } else {
+ $new_template = id(new PhutilInteractiveEditor($template))
+ ->setName('new-commit')
+ ->editInteractively();
+ }
+ $first = false;
if ($template_is_default && ($new_template == $template)) {
- throw new ArcanistUsageException(
- "Template not edited.");
+ throw new ArcanistUsageException("Template not edited.");
}
$template = preg_replace('/^\s*#.*$/m', '', $new_template);