1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Don't create mentions for dependent diffs

Summary:
Fixes T6858. We shouldn't create mentions for dependent diffs.

NOTE: This won't fix the issue for existing revisions (which have the mentions edge), but I think that this is harmless.

Test Plan: Added `Depends on Dxxx` to a differential summary. Saw a `josh added a dependent revision` transaction, but no explicit mention.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6858

Differential Revision: https://secure.phabricator.com/D11460
This commit is contained in:
Joshua Spence 2015-01-23 07:12:05 +11:00
parent 04ee853cec
commit c429e4a222

View file

@ -1276,6 +1276,8 @@ final class DifferentialTransactionEditor
}
$edges = array();
$task_phids = array();
$rev_phids = array();
if ($task_map) {
$tasks = id(new ManiphestTaskQuery())
@ -1284,10 +1286,9 @@ final class DifferentialTransactionEditor
->execute();
if ($tasks) {
$phid_map = mpull($tasks, 'getPHID', 'getPHID');
$task_phids = mpull($tasks, 'getPHID', 'getPHID');
$edge_related = DifferentialRevisionHasTaskEdgeType::EDGECONST;
$edges[$edge_related] = $phid_map;
$this->setUnmentionablePHIDMap($phid_map);
$edges[$edge_related] = $task_phids;
}
}
@ -1308,6 +1309,8 @@ final class DifferentialTransactionEditor
}
}
$this->setUnmentionablePHIDMap(array_merge($task_phids, $rev_phids));
$result = array();
foreach ($edges as $type => $specs) {
$result[] = id(new DifferentialTransaction())