Modernize commit/edge transaction when parsing commit messages

Summary: Ref T5245. With work elsewhere (notably, D9839) we can remove this TODO and use real transactions.

Test Plan: Pushed a `closes Txxx` commit and got a close + transaction.

Reviewers: chad, btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5245

Differential Revision: https://secure.phabricator.com/D9848
This commit is contained in:
epriestley
2014-07-17 15:42:06 -07:00
parent b32313cc85
commit d4b2bfa2f4
9 changed files with 219 additions and 35 deletions

View File

@@ -420,7 +420,7 @@ final class DiffusionCommitController extends DiffusionController {
$edge_query = id(new PhabricatorEdgeQuery())
->withSourcePHIDs(array($commit_phid))
->withEdgeTypes(array(
PhabricatorEdgeConfig::TYPE_COMMIT_HAS_TASK,
DiffusionCommitHasTaskEdgeType::EDGECONST,
PhabricatorEdgeConfig::TYPE_COMMIT_HAS_PROJECT,
PhabricatorEdgeConfig::TYPE_COMMIT_HAS_DREV,
));
@@ -428,7 +428,7 @@ final class DiffusionCommitController extends DiffusionController {
$edges = $edge_query->execute();
$task_phids = array_keys(
$edges[$commit_phid][PhabricatorEdgeConfig::TYPE_COMMIT_HAS_TASK]);
$edges[$commit_phid][DiffusionCommitHasTaskEdgeType::EDGECONST]);
$proj_phids = array_keys(
$edges[$commit_phid][PhabricatorEdgeConfig::TYPE_COMMIT_HAS_PROJECT]);
$revision_phid = key(