Page MenuHomePhabricator

D12894.id31029.diff
No OneTemporary

D12894.id31029.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -11,7 +11,7 @@
'core.pkg.js' => 'a2f2598e',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => 'bb338e4b',
- 'differential.pkg.js' => '895b8d62',
+ 'differential.pkg.js' => '45b3b51d',
'diffusion.pkg.css' => '591664fa',
'diffusion.pkg.js' => '0115b37c',
'maniphest.pkg.css' => '68d4dd3d',
@@ -397,7 +397,7 @@
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
'rsrc/js/application/releeph/releeph-request-state-change.js' => 'a0b57eb8',
'rsrc/js/application/releeph/releeph-request-typeahead.js' => 'de2e896f',
- 'rsrc/js/application/repository/repository-crossreference.js' => 'f9539603',
+ 'rsrc/js/application/repository/repository-crossreference.js' => '3975b470',
'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08',
'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f',
'rsrc/js/application/transactions/behavior-show-older-transactions.js' => 'dbbf48b6',
@@ -631,7 +631,7 @@
'javelin-behavior-remarkup-preview' => 'f7379f45',
'javelin-behavior-reorder-applications' => '76b9fc3e',
'javelin-behavior-reorder-columns' => 'e1d25dfb',
- 'javelin-behavior-repository-crossreference' => 'f9539603',
+ 'javelin-behavior-repository-crossreference' => '3975b470',
'javelin-behavior-scrollbar' => '834a1173',
'javelin-behavior-search-reorder-queries' => 'e9581f08',
'javelin-behavior-select-on-click' => '4e3e79a6',
@@ -1041,6 +1041,12 @@
'331b1611' => array(
'javelin-install',
),
+ '3975b470' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-uri',
+ ),
'3ab51e2c' => array(
'javelin-behavior',
'javelin-behavior-device',
@@ -1986,12 +1992,6 @@
'javelin-util',
'phabricator-busy',
),
- 'f9539603' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-uri',
- ),
'fa0f4fc2' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -296,7 +296,6 @@
'DifferentialAdjustmentMapTestCase' => 'applications/differential/storage/__tests__/DifferentialAdjustmentMapTestCase.php',
'DifferentialAffectedPath' => 'applications/differential/storage/DifferentialAffectedPath.php',
'DifferentialApplyPatchField' => 'applications/differential/customfield/DifferentialApplyPatchField.php',
- 'DifferentialArcanistProjectField' => 'applications/differential/customfield/DifferentialArcanistProjectField.php',
'DifferentialAsanaRepresentationField' => 'applications/differential/customfield/DifferentialAsanaRepresentationField.php',
'DifferentialAuditorsField' => 'applications/differential/customfield/DifferentialAuditorsField.php',
'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php',
@@ -3542,7 +3541,6 @@
'DifferentialAdjustmentMapTestCase' => 'ArcanistPhutilTestCase',
'DifferentialAffectedPath' => 'DifferentialDAO',
'DifferentialApplyPatchField' => 'DifferentialCustomField',
- 'DifferentialArcanistProjectField' => 'DifferentialCustomField',
'DifferentialAsanaRepresentationField' => 'DifferentialCustomField',
'DifferentialAuditorsField' => 'DifferentialStoredCustomField',
'DifferentialAuthorField' => 'DifferentialCustomField',
diff --git a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
@@ -12,7 +12,6 @@
}
protected function defineParamTypes() {
-
$vcs_const = $this->formatStringConstants(
array(
'svn',
@@ -40,7 +39,7 @@
'sourceControlPath' => 'required string',
'sourceControlBaseRevision' => 'required string',
'creationMethod' => 'optional string',
- 'arcanistProject' => 'optional string',
+ 'arcanistProject' => 'deprecated',
'lintStatus' => 'required '.$status_const,
'unitStatus' => 'required '.$status_const,
'repositoryPHID' => 'optional phid',
@@ -84,21 +83,6 @@
}
}
- $project_name = $request->getValue('arcanistProject');
- $project_phid = null;
- if ($project_name) {
- $arcanist_project = id(new PhabricatorRepositoryArcanistProject())
- ->loadOneWhere(
- 'name = %s',
- $project_name);
- if (!$arcanist_project) {
- $arcanist_project = new PhabricatorRepositoryArcanistProject();
- $arcanist_project->setName($project_name);
- $arcanist_project->save();
- }
- $project_phid = $arcanist_project->getPHID();
- }
-
switch ($request->getValue('lintStatus')) {
case 'skip':
$lint_status = DifferentialLintStatus::LINT_SKIP;
@@ -156,7 +140,6 @@
'sourceControlPath' => $request->getValue('sourceControlPath'),
'sourceControlBaseRevision' =>
$request->getValue('sourceControlBaseRevision'),
- 'arcanistProjectPHID' => $project_phid,
'lintStatus' => $lint_status,
'unitStatus' => $unit_status,
);
diff --git a/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
@@ -17,13 +17,15 @@
public function getMethodStatusDescription() {
return pht(
- 'This method has been deprecated in favor of differential.querydiffs.');
+ 'This method has been deprecated in favor of %s.',
+ 'differential.querydiffs');
}
public function getMethodDescription() {
- return pht('Load the content of a diff from Differential by revision id '.
- 'or diff id.');
+ return pht(
+ 'Load the content of a diff from Differential by revision id '.
+ 'or diff id.');
}
protected function defineParamTypes() {
@@ -67,7 +69,6 @@
->setViewer($request->getUser())
->withIDs(array($diff_id))
->needChangesets(true)
- ->needArcanistProjects(true)
->executeOne();
}
diff --git a/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
@@ -12,11 +12,11 @@
}
public function getMethodStatusDescription() {
- return "Replaced by 'differential.query'.";
+ return pht("Replaced by '%s'.", 'differential.query');
}
public function getMethodDescription() {
- return 'Load the content of a revision from Differential.';
+ return pht('Load the content of a revision from Differential.');
}
protected function defineParamTypes() {
@@ -31,7 +31,7 @@
protected function defineErrorTypes() {
return array(
- 'ERR_BAD_REVISION' => 'No such revision exists.',
+ 'ERR_BAD_REVISION' => pht('No such revision exists.'),
);
}
@@ -56,7 +56,6 @@
->setViewer($request->getUser())
->withRevisionIDs(array($revision_id))
->needChangesets(true)
- ->needArcanistProjects(true)
->execute();
$diff_dicts = mpull($diffs, 'getDiffDict');
diff --git a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
@@ -44,7 +44,6 @@
'subscribers' => 'optional list<phid>',
'responsibleUsers' => 'optional list<phid>',
'branches' => 'optional list<string>',
- 'arcanistProjects' => 'optional list<string>',
);
}
@@ -73,7 +72,6 @@
$subscribers = $request->getValue('subscribers');
$responsible_users = $request->getValue('responsibleUsers');
$branches = $request->getValue('branches');
- $arc_projects = $request->getValue('arcanistProjects');
$query = id(new DifferentialRevisionQuery())
->setViewer($request->getUser());
@@ -169,19 +167,6 @@
if ($branches) {
$query->withBranches($branches);
}
- if ($arc_projects) {
- // This is sort of special-cased, but don't make arc do an extra round
- // trip.
- $projects = id(new PhabricatorRepositoryArcanistProject())
- ->loadAllWhere(
- 'name in (%Ls)',
- $arc_projects);
- if (!$projects) {
- return array();
- }
-
- $query->withArcanistProjectPHIDs(mpull($projects, 'getPHID'));
- }
$query->needRelationships(true);
$query->needCommitPHIDs(true);
@@ -228,7 +213,6 @@
'ccs' => array_values($revision->getCCPHIDs()),
'hashes' => $revision->getHashes(),
'auxiliary' => idx($field_data, $phid, array()),
- 'arcanistProjectPHID' => $diff->getArcanistProjectPHID(),
'repositoryPHID' => $diff->getRepositoryPHID(),
);
diff --git a/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
@@ -33,7 +33,6 @@
->withIDs($ids)
->withRevisionIDs($revision_ids)
->needChangesets(true)
- ->needArcanistProjects(true)
->execute();
}
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -33,7 +33,6 @@
$diffs = id(new DifferentialDiffQuery())
->setViewer($request->getUser())
->withRevisionIDs(array($this->revisionID))
- ->needArcanistProjects(true)
->execute();
$diffs = array_reverse($diffs, $preserve_keys = true);
diff --git a/src/applications/differential/customfield/DifferentialArcanistProjectField.php b/src/applications/differential/customfield/DifferentialArcanistProjectField.php
deleted file mode 100644
--- a/src/applications/differential/customfield/DifferentialArcanistProjectField.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-final class DifferentialArcanistProjectField
- extends DifferentialCustomField {
-
- public function getFieldKey() {
- return 'differential:arcanist-project';
- }
-
- public function getFieldName() {
- return pht('Arcanist Project');
- }
-
- public function getFieldDescription() {
- return pht('Shows arcanist project name.');
- }
-
- public function shouldAppearInPropertyView() {
- return true;
- }
-
- public function renderPropertyViewLabel() {
- return $this->getFieldName();
- }
-
- public function getRequiredHandlePHIDsForPropertyView() {
- $phid = $this->getArcanistProjectPHID();
- if ($phid) {
- return array($phid);
- }
- return array();
- }
-
- public function renderPropertyViewValue(array $handles) {
- return $this->renderHandleList($handles);
- }
-
- private function getArcanistProjectPHID() {
- return $this->getObject()->getActiveDiff()->getArcanistProjectPHID();
- }
-
-}
diff --git a/src/applications/differential/editor/DifferentialDiffEditor.php b/src/applications/differential/editor/DifferentialDiffEditor.php
--- a/src/applications/differential/editor/DifferentialDiffEditor.php
+++ b/src/applications/differential/editor/DifferentialDiffEditor.php
@@ -234,8 +234,7 @@
->setSourceControlPath(idx($dict, 'sourceControlPath'))
->setSourceControlBaseRevision(idx($dict, 'sourceControlBaseRevision'))
->setLintStatus(idx($dict, 'lintStatus'))
- ->setUnitStatus(idx($dict, 'unitStatus'))
- ->setArcanistProjectPHID(idx($dict, 'arcanistProjectPHID'));
+ ->setUnitStatus(idx($dict, 'unitStatus'));
return $diff;
}
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -220,7 +220,6 @@
} else {
$object->setRepositoryPHID($diff->getRepositoryPHID());
}
- $object->setArcanistProjectPHID($diff->getArcanistProjectPHID());
$object->attachActiveDiff($diff);
// TODO: Update the `diffPHID` once we add that.
diff --git a/src/applications/differential/query/DifferentialDiffQuery.php b/src/applications/differential/query/DifferentialDiffQuery.php
--- a/src/applications/differential/query/DifferentialDiffQuery.php
+++ b/src/applications/differential/query/DifferentialDiffQuery.php
@@ -7,7 +7,6 @@
private $phids;
private $revisionIDs;
private $needChangesets = false;
- private $needArcanistProjects = false;
public function withIDs(array $ids) {
$this->ids = $ids;
@@ -29,11 +28,6 @@
return $this;
}
- public function needArcanistProjects($bool) {
- $this->needArcanistProjects = $bool;
- return $this;
- }
-
protected function loadPage() {
$table = new DifferentialDiff();
$conn_r = $table->establishConnection('r');
@@ -79,10 +73,6 @@
$diffs = $this->loadChangesets($diffs);
}
- if ($diffs && $this->needArcanistProjects) {
- $diffs = $this->loadArcanistProjects($diffs);
- }
-
return $diffs;
}
@@ -98,29 +88,6 @@
return $diffs;
}
- private function loadArcanistProjects(array $diffs) {
- $phids = array_filter(mpull($diffs, 'getArcanistProjectPHID'));
- $projects = array();
- $project_map = array();
- if ($phids) {
- $projects = id(new PhabricatorRepositoryArcanistProject())
- ->loadAllWhere(
- 'phid IN (%Ls)',
- $phids);
- $project_map = mpull($projects, null, 'getPHID');
- }
-
- foreach ($diffs as $diff) {
- $project = null;
- if ($diff->getArcanistProjectPHID()) {
- $project = idx($project_map, $diff->getArcanistProjectPHID());
- }
- $diff->attachArcanistProject($project);
- }
-
- return $diffs;
- }
-
protected function buildWhereClause(AphrontDatabaseConnection $conn_r) {
$where = array();
diff --git a/src/applications/differential/query/DifferentialRepositoryLookup.php b/src/applications/differential/query/DifferentialRepositoryLookup.php
--- a/src/applications/differential/query/DifferentialRepositoryLookup.php
+++ b/src/applications/differential/query/DifferentialRepositoryLookup.php
@@ -22,22 +22,6 @@
$viewer = $this->viewer;
$diff = $this->diff;
- // Look for an explicit Arcanist project.
- if ($diff->getArcanistProjectPHID()) {
- $project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere(
- 'phid = %s',
- $diff->getArcanistProjectPHID());
- if ($project && $project->getRepositoryID()) {
- $repositories = id(new PhabricatorRepositoryQuery())
- ->setViewer($viewer)
- ->withIDs(array($project->getRepositoryID()))
- ->execute();
- if ($repositories) {
- return head($repositories);
- }
- }
- }
-
// Look for a repository UUID.
if ($diff->getRepositoryUUID()) {
$repositories = id(new PhabricatorRepositoryQuery())
diff --git a/src/applications/differential/query/DifferentialRevisionQuery.php b/src/applications/differential/query/DifferentialRevisionQuery.php
--- a/src/applications/differential/query/DifferentialRevisionQuery.php
+++ b/src/applications/differential/query/DifferentialRevisionQuery.php
@@ -36,7 +36,6 @@
private $phids = array();
private $responsibles = array();
private $branches = array();
- private $arcanistProjectPHIDs = array();
private $repositoryPHIDs;
private $updatedEpochMin;
private $updatedEpochMax;
@@ -228,19 +227,6 @@
}
- /**
- * Filter results to only return revisions with a given set of arcanist
- * projects.
- *
- * @param array List of project PHIDs.
- * @return this
- * @task config
- */
- public function withArcanistProjectPHIDs(array $arc_project_phids) {
- $this->arcanistProjectPHIDs = $arc_project_phids;
- return $this;
- }
-
public function withRepositoryPHIDs(array $repository_phids) {
$this->repositoryPHIDs = $repository_phids;
return $this;
@@ -771,13 +757,6 @@
$this->branches);
}
- if ($this->arcanistProjectPHIDs) {
- $where[] = qsprintf(
- $conn_r,
- 'r.arcanistProjectPHID in (%Ls)',
- $this->arcanistProjectPHIDs);
- }
-
if ($this->updatedEpochMin !== null) {
$where[] = qsprintf(
$conn_r,
diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php
--- a/src/applications/differential/storage/DifferentialDiff.php
+++ b/src/applications/differential/storage/DifferentialDiff.php
@@ -262,7 +262,6 @@
'lintStatus' => $this->getLintStatus(),
'changes' => array(),
'properties' => array(),
- 'projectName' => $this->getArcanistProjectName(),
);
$dict['changes'] = $this->buildChangesList();
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
@@ -321,14 +321,6 @@
$this->repository->getCallsign().
$this->commit->getCommitIdentifier());
- // TODO: This is not correct in SVN where one repository can have multiple
- // Arcanist projects.
- $arcanist_project = id(new PhabricatorRepositoryArcanistProject())
- ->loadOneWhere('repositoryID = %d LIMIT 1', $this->repository->getID());
- if ($arcanist_project) {
- $diff->setArcanistProjectPHID($arcanist_project->getPHID());
- }
-
$parents = DiffusionQuery::callConduitWithDiffusionRequest(
$viewer,
$drequest,

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 10:21 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274629
Default Alt Text
D12894.id31029.diff (18 KB)

Event Timeline