Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15414384
D8522.id20219.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8522.id20219.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 12:22 AM (22 h, 49 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383422
Default Alt Text
D8522.id20219.diff (2 KB)
Attached To
Mode
D8522: Don't close revisions on "arc amend"
Attached
Detach File
Event Timeline
Log In to Comment