Page MenuHomePhabricator

D8522.diff
No OneTemporary

D8522.diff

diff --git a/src/workflow/ArcanistAmendWorkflow.php b/src/workflow/ArcanistAmendWorkflow.php
--- a/src/workflow/ArcanistAmendWorkflow.php
+++ b/src/workflow/ArcanistAmendWorkflow.php
@@ -1,9 +1,7 @@
<?php
/**
- * Updates git commit messages after a revision is "Accepted".
- *
- * @group workflow
+ * Synchronizes commit messages from Differential.
*/
final class ArcanistAmendWorkflow extends ArcanistBaseWorkflow {
@@ -21,8 +19,8 @@
public function getCommandHelp() {
return phutil_console_format(<<<EOTEXT
Supports: git, hg
- Amend the working copy after a revision has been accepted, so commits
- can be marked 'committed' and pushed upstream.
+ Amend the working copy, synchronizing the local commit message from
+ Differential.
Supported in Mercurial 2.2 and newer.
EOTEXT
@@ -48,14 +46,16 @@
public function getArguments() {
return array(
'show' => array(
- 'help' =>
- "Show the amended commit message, without modifying the working copy."
+ 'help' => pht(
+ 'Show the amended commit message, without modifying the '.
+ 'working copy.'),
),
'revision' => array(
'param' => 'revision_id',
- 'help' =>
- "Amend a specific revision. If you do not specify a revision, ".
- "arc will look in the commit message at HEAD.",
+ 'help' => pht(
+ 'Use the message from a specific revision. If you do not specify '.
+ 'a revision, arc will guess which revision is in the working '.
+ 'copy.'),
),
);
}
@@ -75,9 +75,9 @@
throw new ArcanistUsageException(
"This project is marked as adhering to a conservative history ".
"mutability doctrine (having an immutable local history), which ".
- "precludes amending commit messages. You can use 'arc merge' to ".
- "merge feature branches instead.");
+ "precludes amending commit messages.");
}
+
if ($repository_api->getUncommittedChanges()) {
throw new ArcanistUsageException(
"You have uncommitted changes in this branch. Stage and commit (or ".
@@ -166,20 +166,11 @@
"D{$revision_id}: {$revision_title}");
$repository_api->amendCommit($message);
-
- $mark_workflow = $this->buildChildWorkflow(
- 'close-revision',
- array(
- '--finalize',
- $revision_id,
- ));
- $mark_workflow->run();
}
return 0;
}
-
protected function getSupportedRevisionControlSystems() {
return array('git', 'hg');
}

File Metadata

Mime Type
text/plain
Expires
Sun, May 12, 2:43 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6287348
Default Alt Text
D8522.diff (2 KB)

Event Timeline