Skip to content

Commit cec8d10

Browse files
author
epriestley
committed
Rename concrete Harbormaster step implementations
Summary: Ref T1049. For consistency, rename these to "Harbormaster...". Test Plan: Ran migration, ran builds, everything still works fine. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1049 Differential Revision: https://secure.phabricator.com/D8602
1 parent 281f06e commit cec8d10

8 files changed

+53
-18
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
$names = array(
4+
'CommandBuildStepImplementation',
5+
'LeaseHostBuildStepImplementation',
6+
'PublishFragmentBuildStepImplementation',
7+
'SleepBuildStepImplementation',
8+
'UploadArtifactBuildStepImplementation',
9+
'WaitForPreviousBuildStepImplementation',
10+
);
11+
12+
$tables = array(
13+
id(new HarbormasterBuildStep())->getTableName(),
14+
id(new HarbormasterBuildTarget())->getTableName(),
15+
);
16+
17+
echo "Renaming Harbormaster classes...\n";
18+
19+
$conn_w = id(new HarbormasterBuildStep())->establishConnection('w');
20+
foreach ($names as $name) {
21+
$old = $name;
22+
$new = 'Harbormaster'.$name;
23+
24+
echo "Renaming {$old} -> {$new}...\n";
25+
foreach ($tables as $table) {
26+
queryfx(
27+
$conn_w,
28+
'UPDATE %T SET className = %s WHERE className = %s',
29+
$table,
30+
$new,
31+
$old);
32+
}
33+
}
34+
35+
echo "Done.\n";

src/__phutil_library_map__.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
'CelerityResourcesOnDisk' => 'infrastructure/celerity/resources/CelerityResourcesOnDisk.php',
112112
'CeleritySpriteGenerator' => 'infrastructure/celerity/CeleritySpriteGenerator.php',
113113
'CelerityStaticResourceResponse' => 'infrastructure/celerity/CelerityStaticResourceResponse.php',
114-
'CommandBuildStepImplementation' => 'applications/harbormaster/step/CommandBuildStepImplementation.php',
115114
'ConduitAPIMethod' => 'applications/conduit/method/ConduitAPIMethod.php',
116115
'ConduitAPIRequest' => 'applications/conduit/protocol/ConduitAPIRequest.php',
117116
'ConduitAPIResponse' => 'applications/conduit/protocol/ConduitAPIResponse.php',
@@ -730,9 +729,11 @@
730729
'HarbormasterBuildableSearchEngine' => 'applications/harbormaster/query/HarbormasterBuildableSearchEngine.php',
731730
'HarbormasterBuildableViewController' => 'applications/harbormaster/controller/HarbormasterBuildableViewController.php',
732731
'HarbormasterCapabilityManagePlans' => 'applications/harbormaster/capability/HarbormasterCapabilityManagePlans.php',
732+
'HarbormasterCommandBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterCommandBuildStepImplementation.php',
733733
'HarbormasterController' => 'applications/harbormaster/controller/HarbormasterController.php',
734734
'HarbormasterDAO' => 'applications/harbormaster/storage/HarbormasterDAO.php',
735735
'HarbormasterHTTPRequestBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php',
736+
'HarbormasterLeaseHostBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php',
736737
'HarbormasterManagementBuildWorkflow' => 'applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php',
737738
'HarbormasterManagementWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWorkflow.php',
738739
'HarbormasterObject' => 'applications/harbormaster/storage/HarbormasterObject.php',
@@ -750,14 +751,18 @@
750751
'HarbormasterPlanOrderController' => 'applications/harbormaster/controller/HarbormasterPlanOrderController.php',
751752
'HarbormasterPlanRunController' => 'applications/harbormaster/controller/HarbormasterPlanRunController.php',
752753
'HarbormasterPlanViewController' => 'applications/harbormaster/controller/HarbormasterPlanViewController.php',
754+
'HarbormasterPublishFragmentBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterPublishFragmentBuildStepImplementation.php',
753755
'HarbormasterRemarkupRule' => 'applications/harbormaster/remarkup/HarbormasterRemarkupRule.php',
754756
'HarbormasterScratchTable' => 'applications/harbormaster/storage/HarbormasterScratchTable.php',
757+
'HarbormasterSleepBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterSleepBuildStepImplementation.php',
755758
'HarbormasterStepAddController' => 'applications/harbormaster/controller/HarbormasterStepAddController.php',
756759
'HarbormasterStepDeleteController' => 'applications/harbormaster/controller/HarbormasterStepDeleteController.php',
757760
'HarbormasterStepEditController' => 'applications/harbormaster/controller/HarbormasterStepEditController.php',
758761
'HarbormasterTargetWorker' => 'applications/harbormaster/worker/HarbormasterTargetWorker.php',
759762
'HarbormasterThrowExceptionBuildStep' => 'applications/harbormaster/step/HarbormasterThrowExceptionBuildStep.php',
760763
'HarbormasterUIEventListener' => 'applications/harbormaster/event/HarbormasterUIEventListener.php',
764+
'HarbormasterUploadArtifactBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterUploadArtifactBuildStepImplementation.php',
765+
'HarbormasterWaitForPreviousBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterWaitForPreviousBuildStepImplementation.php',
761766
'HarbormasterWorker' => 'applications/harbormaster/worker/HarbormasterWorker.php',
762767
'HeraldAction' => 'applications/herald/storage/HeraldAction.php',
763768
'HeraldAdapter' => 'applications/herald/adapter/HeraldAdapter.php',
@@ -815,7 +820,6 @@
815820
'JavelinUIExample' => 'applications/uiexample/examples/JavelinUIExample.php',
816821
'JavelinViewExample' => 'applications/uiexample/examples/JavelinViewExample.php',
817822
'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php',
818-
'LeaseHostBuildStepImplementation' => 'applications/harbormaster/step/LeaseHostBuildStepImplementation.php',
819823
'LegalpadCapabilityDefaultEdit' => 'applications/legalpad/capability/LegalpadCapabilityDefaultEdit.php',
820824
'LegalpadCapabilityDefaultView' => 'applications/legalpad/capability/LegalpadCapabilityDefaultView.php',
821825
'LegalpadConstants' => 'applications/legalpad/constants/LegalpadConstants.php',
@@ -2457,7 +2461,6 @@
24572461
'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php',
24582462
'ProjectCapabilityCreateProjects' => 'applications/project/capability/ProjectCapabilityCreateProjects.php',
24592463
'ProjectRemarkupRule' => 'applications/project/remarkup/ProjectRemarkupRule.php',
2460-
'PublishFragmentBuildStepImplementation' => 'applications/harbormaster/step/PublishFragmentBuildStepImplementation.php',
24612464
'QueryFormattingTestCase' => 'infrastructure/storage/__tests__/QueryFormattingTestCase.php',
24622465
'ReleephAuthorFieldSpecification' => 'applications/releeph/field/specification/ReleephAuthorFieldSpecification.php',
24632466
'ReleephBranch' => 'applications/releeph/storage/ReleephBranch.php',
@@ -2536,13 +2539,10 @@
25362539
'ReleephSummaryFieldSpecification' => 'applications/releeph/field/specification/ReleephSummaryFieldSpecification.php',
25372540
'ReleephUserView' => 'applications/releeph/view/user/ReleephUserView.php',
25382541
'ShellLogView' => 'applications/harbormaster/view/ShellLogView.php',
2539-
'SleepBuildStepImplementation' => 'applications/harbormaster/step/SleepBuildStepImplementation.php',
25402542
'SlowvoteEmbedView' => 'applications/slowvote/view/SlowvoteEmbedView.php',
25412543
'SlowvoteRemarkupRule' => 'applications/slowvote/remarkup/SlowvoteRemarkupRule.php',
25422544
'SubscriptionListDialogBuilder' => 'applications/subscriptions/view/SubscriptionListDialogBuilder.php',
25432545
'SubscriptionListStringBuilder' => 'applications/subscriptions/view/SubscriptionListStringBuilder.php',
2544-
'UploadArtifactBuildStepImplementation' => 'applications/harbormaster/step/UploadArtifactBuildStepImplementation.php',
2545-
'WaitForPreviousBuildStepImplementation' => 'applications/harbormaster/step/WaitForPreviousBuildStepImplementation.php',
25462546
),
25472547
'function' =>
25482548
array(
@@ -2663,7 +2663,6 @@
26632663
'CelerityResourceGraph' => 'AbstractDirectedGraph',
26642664
'CelerityResourceTransformerTestCase' => 'PhabricatorTestCase',
26652665
'CelerityResourcesOnDisk' => 'CelerityPhysicalResources',
2666-
'CommandBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
26672666
'ConduitAPIMethod' =>
26682667
array(
26692668
0 => 'Phobject',
@@ -3351,9 +3350,11 @@
33513350
'HarbormasterBuildableSearchEngine' => 'PhabricatorApplicationSearchEngine',
33523351
'HarbormasterBuildableViewController' => 'HarbormasterController',
33533352
'HarbormasterCapabilityManagePlans' => 'PhabricatorPolicyCapability',
3353+
'HarbormasterCommandBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
33543354
'HarbormasterController' => 'PhabricatorController',
33553355
'HarbormasterDAO' => 'PhabricatorLiskDAO',
33563356
'HarbormasterHTTPRequestBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
3357+
'HarbormasterLeaseHostBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
33573358
'HarbormasterManagementBuildWorkflow' => 'HarbormasterManagementWorkflow',
33583359
'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow',
33593360
'HarbormasterObject' => 'HarbormasterDAO',
@@ -3375,14 +3376,18 @@
33753376
'HarbormasterPlanOrderController' => 'HarbormasterController',
33763377
'HarbormasterPlanRunController' => 'HarbormasterController',
33773378
'HarbormasterPlanViewController' => 'HarbormasterPlanController',
3379+
'HarbormasterPublishFragmentBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
33783380
'HarbormasterRemarkupRule' => 'PhabricatorRemarkupRuleObject',
33793381
'HarbormasterScratchTable' => 'HarbormasterDAO',
3382+
'HarbormasterSleepBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
33803383
'HarbormasterStepAddController' => 'HarbormasterController',
33813384
'HarbormasterStepDeleteController' => 'HarbormasterController',
33823385
'HarbormasterStepEditController' => 'HarbormasterController',
33833386
'HarbormasterTargetWorker' => 'HarbormasterWorker',
33843387
'HarbormasterThrowExceptionBuildStep' => 'HarbormasterBuildStepImplementation',
33853388
'HarbormasterUIEventListener' => 'PhabricatorEventListener',
3389+
'HarbormasterUploadArtifactBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
3390+
'HarbormasterWaitForPreviousBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
33863391
'HarbormasterWorker' => 'PhabricatorWorker',
33873392
'HeraldAction' => 'HeraldDAO',
33883393
'HeraldApplyTranscript' => 'HeraldDAO',
@@ -3448,7 +3453,6 @@
34483453
'JavelinUIExample' => 'PhabricatorUIExample',
34493454
'JavelinViewExample' => 'PhabricatorUIExample',
34503455
'JavelinViewExampleServerView' => 'AphrontView',
3451-
'LeaseHostBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
34523456
'LegalpadCapabilityDefaultEdit' => 'PhabricatorPolicyCapability',
34533457
'LegalpadCapabilityDefaultView' => 'PhabricatorPolicyCapability',
34543458
'LegalpadController' => 'PhabricatorController',
@@ -5398,7 +5402,6 @@
53985402
'PonderVoteSaveController' => 'PonderController',
53995403
'ProjectCapabilityCreateProjects' => 'PhabricatorPolicyCapability',
54005404
'ProjectRemarkupRule' => 'PhabricatorRemarkupRuleObject',
5401-
'PublishFragmentBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
54025405
'QueryFormattingTestCase' => 'PhabricatorTestCase',
54035406
'ReleephAuthorFieldSpecification' => 'ReleephFieldSpecification',
54045407
'ReleephBranch' =>
@@ -5502,10 +5505,7 @@
55025505
'ReleephSummaryFieldSpecification' => 'ReleephFieldSpecification',
55035506
'ReleephUserView' => 'AphrontView',
55045507
'ShellLogView' => 'AphrontView',
5505-
'SleepBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
55065508
'SlowvoteEmbedView' => 'AphrontView',
55075509
'SlowvoteRemarkupRule' => 'PhabricatorRemarkupRuleObject',
5508-
'UploadArtifactBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
5509-
'WaitForPreviousBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
55105510
),
55115511
));

src/applications/harbormaster/step/CommandBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterCommandBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class CommandBuildStepImplementation
3+
final class HarbormasterCommandBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

src/applications/harbormaster/step/LeaseHostBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class LeaseHostBuildStepImplementation
3+
final class HarbormasterLeaseHostBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

src/applications/harbormaster/step/PublishFragmentBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterPublishFragmentBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class PublishFragmentBuildStepImplementation
3+
final class HarbormasterPublishFragmentBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

src/applications/harbormaster/step/SleepBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterSleepBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class SleepBuildStepImplementation
3+
final class HarbormasterSleepBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

src/applications/harbormaster/step/UploadArtifactBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterUploadArtifactBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class UploadArtifactBuildStepImplementation
3+
final class HarbormasterUploadArtifactBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

src/applications/harbormaster/step/WaitForPreviousBuildStepImplementation.php renamed to src/applications/harbormaster/step/HarbormasterWaitForPreviousBuildStepImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class WaitForPreviousBuildStepImplementation
3+
final class HarbormasterWaitForPreviousBuildStepImplementation
44
extends HarbormasterBuildStepImplementation {
55

66
public function getName() {

0 commit comments

Comments
 (0)