Use Application PHIDs for commits

Summary: Ref T2716. Ref T2715. Move CMIT to use Application PHIDs. Nothing too special here, but I consolidated some code into DiffusionCommitQuery. Depends on D6514.

Test Plan: Browsed Diffusion. Browsed Differential/Maniphest with linked commits. Used jump nav; used `phid.lookup` and `phid.query`. Used remarkup for Git and SVN repos. Grepped for PHID_TYPE_CMIT.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2715, T2716

Differential Revision: https://secure.phabricator.com/D6515
This commit is contained in:
epriestley
2013-07-21 10:57:07 -07:00
parent c5a06a624a
commit 0e3cb3b393
13 changed files with 166 additions and 133 deletions

View File

@@ -206,7 +206,7 @@ final class PhabricatorSearchAttachController
$noun = 'Tasks';
$selected = 'assigned';
break;
case PhabricatorPHIDConstants::PHID_TYPE_CMIT:
case PhabricatorRepositoryPHIDTypeCommit::TYPECONST:
$noun = 'Commits';
$selected = 'created';
break;
@@ -269,7 +269,7 @@ final class PhabricatorSearchAttachController
}
private function getEdgeType($src_type, $dst_type) {
$t_cmit = PhabricatorPHIDConstants::PHID_TYPE_CMIT;
$t_cmit = PhabricatorRepositoryPHIDTypeCommit::TYPECONST;
$t_task = PhabricatorPHIDConstants::PHID_TYPE_TASK;
$t_drev = DifferentialPHIDTypeRevision::TYPECONST;
$t_mock = PhabricatorPHIDConstants::PHID_TYPE_MOCK;

View File

@@ -63,7 +63,7 @@ final class PhabricatorSearchController
case PhabricatorSearchScope::SCOPE_COMMITS:
$query->setParameter(
'type',
PhabricatorPHIDConstants::PHID_TYPE_CMIT);
PhabricatorRepositoryPHIDTypeCommit::TYPECONST);
break;
default:
break;

View File

@@ -16,7 +16,7 @@ final class PhabricatorSearchAbstractDocument {
public static function getSupportedTypes() {
return array(
DifferentialPHIDTypeRevision::TYPECONST => 'Differential Revisions',
PhabricatorPHIDConstants::PHID_TYPE_CMIT => 'Repository Commits',
PhabricatorRepositoryPHIDTypeCommit::TYPECONST => 'Repository Commits',
PhabricatorPHIDConstants::PHID_TYPE_TASK => 'Maniphest Tasks',
PhabricatorPHIDConstants::PHID_TYPE_WIKI => 'Phriction Documents',
PhabricatorPHIDConstants::PHID_TYPE_USER => 'Phabricator Users',