Page MenuHomePhabricator

D7792.diff
No OneTemporary

D7792.diff

Index: src/applications/diffusion/engine/DiffusionCommitHookEngine.php
===================================================================
--- src/applications/diffusion/engine/DiffusionCommitHookEngine.php
+++ src/applications/diffusion/engine/DiffusionCommitHookEngine.php
@@ -25,6 +25,7 @@
private $remoteProtocol;
private $transactionKey;
private $mercurialHook;
+ private $mercurialCommits = array();
private $heraldViewerProjects;
@@ -578,6 +579,7 @@
list($commit_raw) = $futures['commits']->resolvex();
$commit_map = $this->parseMercurialCommits($commit_raw);
+ $this->mercurialCommits = $commit_map;
list($old_raw) = $futures['old']->resolvex();
$old_refs = $this->parseMercurialHeads($old_raw);
@@ -797,8 +799,16 @@
}
private function findMercurialContentUpdates(array $ref_updates) {
- // TODO: Implement.
- return array();
+ $content_updates = array();
+
+ foreach ($this->mercurialCommits as $commit => $branches) {
+ $content_updates[$commit] = $this->newPushLog()
+ ->setRefType(PhabricatorRepositoryPushLog::REFTYPE_COMMIT)
+ ->setRefNew($commit)
+ ->setChangeFlags(PhabricatorRepositoryPushLog::CHANGEFLAG_ADD);
+ }
+
+ return $content_updates;
}
private function parseMercurialCommits($raw) {

File Metadata

Mime Type
text/plain
Expires
Oct 19 2024, 7:04 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714626
Default Alt Text
D7792.diff (1 KB)

Event Timeline