Skip to content

Commit 1e9a462

Browse files
author
epriestley
committed
Remove most of the legacy hunk code
Summary: Ref T8475. This gets rid of most of the old "legacy hunk" code. I'll nuke the rest (and drop the old table) once we're more sure that we're in the clear. Test Plan: Browsed Differential. Reviewers: chad Reviewed By: chad Maniphest Tasks: T8475 Differential Revision: https://secure.phabricator.com/D17040
1 parent c67e87c commit 1e9a462

File tree

7 files changed

+1
-112
lines changed

7 files changed

+1
-112
lines changed

bin/hunks

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/setup/manage_hunks.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/__phutil_library_map__.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,8 +2784,6 @@
27842784
'PhabricatorHomeQuickCreateController' => 'applications/home/controller/PhabricatorHomeQuickCreateController.php',
27852785
'PhabricatorHovercardEngineExtension' => 'applications/search/engineextension/PhabricatorHovercardEngineExtension.php',
27862786
'PhabricatorHovercardEngineExtensionModule' => 'applications/search/engineextension/PhabricatorHovercardEngineExtensionModule.php',
2787-
'PhabricatorHunksManagementMigrateWorkflow' => 'applications/differential/management/PhabricatorHunksManagementMigrateWorkflow.php',
2788-
'PhabricatorHunksManagementWorkflow' => 'applications/differential/management/PhabricatorHunksManagementWorkflow.php',
27892787
'PhabricatorIDsSearchEngineExtension' => 'applications/search/engineextension/PhabricatorIDsSearchEngineExtension.php',
27902788
'PhabricatorIDsSearchField' => 'applications/search/field/PhabricatorIDsSearchField.php',
27912789
'PhabricatorIRCProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php',
@@ -7777,8 +7775,6 @@
77777775
'PhabricatorHomeQuickCreateController' => 'PhabricatorHomeController',
77787776
'PhabricatorHovercardEngineExtension' => 'Phobject',
77797777
'PhabricatorHovercardEngineExtensionModule' => 'PhabricatorConfigModule',
7780-
'PhabricatorHunksManagementMigrateWorkflow' => 'PhabricatorHunksManagementWorkflow',
7781-
'PhabricatorHunksManagementWorkflow' => 'PhabricatorManagementWorkflow',
77827778
'PhabricatorIDsSearchEngineExtension' => 'PhabricatorSearchEngineExtension',
77837779
'PhabricatorIDsSearchField' => 'PhabricatorSearchField',
77847780
'PhabricatorIRCProtocolAdapter' => 'PhabricatorProtocolAdapter',

src/applications/differential/management/PhabricatorHunksManagementMigrateWorkflow.php

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/applications/differential/management/PhabricatorHunksManagementWorkflow.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/applications/differential/query/DifferentialHunkQuery.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,9 @@ protected function loadPage() {
4646
$this->buildLimitClause($conn_r));
4747
$modern_results = $table->loadAllFromArray($modern_data);
4848

49-
50-
// Now, load legacy hunks.
51-
$table = new DifferentialLegacyHunk();
52-
$conn_r = $table->establishConnection('r');
53-
54-
$legacy_data = queryfx_all(
55-
$conn_r,
56-
'SELECT * FROM %T %Q %Q %Q',
57-
$table->getTableName(),
58-
$this->buildWhereClause($conn_r),
59-
$this->buildOrderClause($conn_r),
60-
$this->buildLimitClause($conn_r));
61-
$legacy_results = $table->loadAllFromArray($legacy_data);
62-
6349
// Strip all the IDs off since they're not unique and nothing should be
6450
// using them.
65-
return array_values(array_merge($legacy_results, $modern_results));
51+
return array_values($modern_results);
6652
}
6753

6854
protected function willFilterPage(array $hunks) {

src/applications/differential/storage/DifferentialChangeset.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ public function save() {
9898
public function delete() {
9999
$this->openTransaction();
100100

101-
$legacy_hunks = id(new DifferentialLegacyHunk())->loadAllWhere(
102-
'changesetID = %d',
103-
$this->getID());
104-
foreach ($legacy_hunks as $legacy_hunk) {
105-
$legacy_hunk->delete();
106-
}
107-
108101
$modern_hunks = id(new DifferentialModernHunk())->loadAllWhere(
109102
'changesetID = %d',
110103
$this->getID());

0 commit comments

Comments
 (0)