Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14039916
D11212.id26918.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11212.id26918.diff
View Options
diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
--- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
+++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
@@ -117,18 +117,31 @@
// reverts itself.
unset($reverted_commit_phids[$commit->getPHID()]);
- $editor = new PhabricatorEdgeEditor();
- foreach ($reverted_commit_phids as $commit_phid) {
- try {
- $editor->addEdge(
- $commit->getPHID(),
- DiffusionCommitRevertsCommitEdgeType::EDGECONST,
- $commit_phid);
- } catch (PhabricatorEdgeCycleException $ex) {
- continue;
- }
+ $xactions = array();
+
+ $xactions[] = id(new PhabricatorAuditTransaction())
+ ->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
+ ->setMetadataValue('edge:type', DiffusionCommitRevertsCommitEdgeType::EDGECONST)
+ ->setNewValue(array('+' => array_fuse($reverted_commit_phids)))
+ ->attachComment(
+ id(new PhabricatorAuditTransactionComment())
+ ->setCommitPHID($commit->getPHID())
+ ->setContent($message));
+
+ $content_source = PhabricatorContentSource::newForSource(
+ PhabricatorContentSource::SOURCE_DAEMON,
+ array());
+
+ try {
+ $editor = id(new PhabricatorAuditEditor())
+ ->setActor($actor)
+ ->setActingAsPHID($acting_as_phid)
+ ->setContinueOnMissingFields(true)
+ ->setContentSource($content_source)
+ ->applyTransactions($commit, $xactions);
+ } catch (PhabricatorApplicationTransactionNoEffectException $ex) {
+ //
}
- $editor->save();
}
// NOTE: The `differential_commit` table has a unique ID on `commitPHID`,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 12, 6:43 AM (6 d, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6765921
Default Alt Text
D11212.id26918.diff (1 KB)
Attached To
Mode
D11212: Use `PhabricatorAuditEditor` to write revert edges
Attached
Detach File
Event Timeline
Log In to Comment