mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Deprecate "Track Only" in the Diffusion UI
Summary: Depends on D20432. Ref T13277. Fixes T12967. Removes some "Track Only" hints and warns that the feature is deprecated in favor of "Permanent Refs" and "Fetch Only". (This "fixes" T12967 by mooting it.) Test Plan: Viewed "branches" sectino of the manage UI, edited "braches" section of a repository. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13277, T12967 Differential Revision: https://secure.phabricator.com/D20433
This commit is contained in:
parent
6449a0ecb2
commit
c33f544e74
2 changed files with 22 additions and 23 deletions
|
@ -253,6 +253,11 @@ final class DiffusionRepositoryEditEngine
|
|||
}
|
||||
}
|
||||
|
||||
$track_instructions = pht(
|
||||
'WARNING: The "Track Only" feature is deprecated. Use "Fetch Refs" '.
|
||||
'and "Permanent Refs" instead. This feature will be removed in a '.
|
||||
'future version of Phabricator.');
|
||||
|
||||
return array(
|
||||
id(new PhabricatorSelectEditField())
|
||||
->setKey('vcs')
|
||||
|
@ -376,17 +381,6 @@ final class DiffusionRepositoryEditEngine
|
|||
->setConduitDescription(pht('Set the fetched refs.'))
|
||||
->setConduitTypeDescription(pht('New fetched refs.'))
|
||||
->setValue($fetch_value),
|
||||
id(new PhabricatorTextAreaEditField())
|
||||
->setIsStringList(true)
|
||||
->setKey('trackOnly')
|
||||
->setLabel(pht('Track Only'))
|
||||
->setTransactionType(
|
||||
PhabricatorRepositoryTrackOnlyTransaction::TRANSACTIONTYPE)
|
||||
->setIsCopyable(true)
|
||||
->setDescription(pht('Track only these branches.'))
|
||||
->setConduitDescription(pht('Set the tracked branches.'))
|
||||
->setConduitTypeDescription(pht('New tracked branches.'))
|
||||
->setValue($track_value),
|
||||
id(new PhabricatorTextAreaEditField())
|
||||
->setIsStringList(true)
|
||||
->setKey('permanentRefs')
|
||||
|
@ -398,6 +392,18 @@ final class DiffusionRepositoryEditEngine
|
|||
->setConduitDescription(pht('Set the permanent refs.'))
|
||||
->setConduitTypeDescription(pht('New permanent ref rules.'))
|
||||
->setValue($permanent_value),
|
||||
id(new PhabricatorTextAreaEditField())
|
||||
->setIsStringList(true)
|
||||
->setKey('trackOnly')
|
||||
->setLabel(pht('Track Only'))
|
||||
->setTransactionType(
|
||||
PhabricatorRepositoryTrackOnlyTransaction::TRANSACTIONTYPE)
|
||||
->setIsCopyable(true)
|
||||
->setControlInstructions($track_instructions)
|
||||
->setDescription(pht('Track only these branches.'))
|
||||
->setConduitDescription(pht('Set the tracked branches.'))
|
||||
->setConduitTypeDescription(pht('New tracked branches.'))
|
||||
->setValue($track_value),
|
||||
id(new PhabricatorTextEditField())
|
||||
->setKey('importOnly')
|
||||
->setLabel(pht('Import Only'))
|
||||
|
|
|
@ -37,8 +37,8 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
return array(
|
||||
'defaultBranch',
|
||||
'fetchRefs',
|
||||
'trackOnly',
|
||||
'permanentRefs',
|
||||
'trackOnly',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -90,12 +90,10 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
}
|
||||
|
||||
$track_only_rules = $repository->getTrackOnlyRules();
|
||||
if ($track_only_rules) {
|
||||
$track_only_rules = implode(', ', $track_only_rules);
|
||||
$track_only = nonempty(
|
||||
$track_only_rules,
|
||||
phutil_tag('em', array(), pht('Track All Branches')));
|
||||
$view->addProperty(pht('Track Only'), $track_only);
|
||||
|
||||
$view->addProperty(pht('Track Only'), $track_only_rules);
|
||||
}
|
||||
|
||||
$publishing_disabled = $repository->isPublishingDisabled();
|
||||
if ($publishing_disabled) {
|
||||
|
@ -134,7 +132,6 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
$rows = array();
|
||||
foreach ($branches as $branch) {
|
||||
$branch_name = $branch->getShortName();
|
||||
$tracking = $repository->shouldTrackBranch($branch_name);
|
||||
$permanent = $repository->shouldAutocloseBranch($branch_name);
|
||||
|
||||
$default = $repository->getDefaultBranch();
|
||||
|
@ -166,7 +163,6 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
$icon,
|
||||
$branch_name,
|
||||
$status,
|
||||
$tracking ? pht('Tracking') : pht('Off'),
|
||||
$permanent_status,
|
||||
);
|
||||
}
|
||||
|
@ -176,7 +172,6 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
'',
|
||||
pht('Branch'),
|
||||
pht('Status'),
|
||||
pht('Track'),
|
||||
pht('Permanent'),
|
||||
));
|
||||
$branch_table->setColumnClasses(
|
||||
|
@ -184,7 +179,6 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
'',
|
||||
'pri',
|
||||
'narrow',
|
||||
'narrow',
|
||||
'wide',
|
||||
));
|
||||
$branch_table->setColumnVisibility(
|
||||
|
@ -193,7 +187,6 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
true,
|
||||
$can_close_branches,
|
||||
true,
|
||||
true,
|
||||
));
|
||||
|
||||
$box = $this->newBox(pht('Branch Status'), $branch_table);
|
||||
|
|
Loading…
Reference in a new issue