@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+22 -23
+17 -11
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
··· 253 253 } 254 254 } 255 255 256 + $track_instructions = pht( 257 + 'WARNING: The "Track Only" feature is deprecated. Use "Fetch Refs" '. 258 + 'and "Permanent Refs" instead. This feature will be removed in a '. 259 + 'future version of Phabricator.'); 260 + 256 261 return array( 257 262 id(new PhabricatorSelectEditField()) 258 263 ->setKey('vcs') ··· 378 383 ->setValue($fetch_value), 379 384 id(new PhabricatorTextAreaEditField()) 380 385 ->setIsStringList(true) 386 + ->setKey('permanentRefs') 387 + ->setLabel(pht('Permanent Refs')) 388 + ->setTransactionType( 389 + PhabricatorRepositoryPermanentRefsTransaction::TRANSACTIONTYPE) 390 + ->setIsCopyable(true) 391 + ->setDescription(pht('Only these refs are considered permanent.')) 392 + ->setConduitDescription(pht('Set the permanent refs.')) 393 + ->setConduitTypeDescription(pht('New permanent ref rules.')) 394 + ->setValue($permanent_value), 395 + id(new PhabricatorTextAreaEditField()) 396 + ->setIsStringList(true) 381 397 ->setKey('trackOnly') 382 398 ->setLabel(pht('Track Only')) 383 399 ->setTransactionType( 384 400 PhabricatorRepositoryTrackOnlyTransaction::TRANSACTIONTYPE) 385 401 ->setIsCopyable(true) 402 + ->setControlInstructions($track_instructions) 386 403 ->setDescription(pht('Track only these branches.')) 387 404 ->setConduitDescription(pht('Set the tracked branches.')) 388 405 ->setConduitTypeDescription(pht('New tracked branches.')) 389 406 ->setValue($track_value), 390 - id(new PhabricatorTextAreaEditField()) 391 - ->setIsStringList(true) 392 - ->setKey('permanentRefs') 393 - ->setLabel(pht('Permanent Refs')) 394 - ->setTransactionType( 395 - PhabricatorRepositoryPermanentRefsTransaction::TRANSACTIONTYPE) 396 - ->setIsCopyable(true) 397 - ->setDescription(pht('Only these refs are considered permanent.')) 398 - ->setConduitDescription(pht('Set the permanent refs.')) 399 - ->setConduitTypeDescription(pht('New permanent ref rules.')) 400 - ->setValue($permanent_value), 401 407 id(new PhabricatorTextEditField()) 402 408 ->setKey('importOnly') 403 409 ->setLabel(pht('Import Only'))
+5 -12
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
··· 37 37 return array( 38 38 'defaultBranch', 39 39 'fetchRefs', 40 - 'trackOnly', 41 40 'permanentRefs', 41 + 'trackOnly', 42 42 ); 43 43 } 44 44 ··· 90 90 } 91 91 92 92 $track_only_rules = $repository->getTrackOnlyRules(); 93 - $track_only_rules = implode(', ', $track_only_rules); 94 - $track_only = nonempty( 95 - $track_only_rules, 96 - phutil_tag('em', array(), pht('Track All Branches'))); 97 - $view->addProperty(pht('Track Only'), $track_only); 98 - 93 + if ($track_only_rules) { 94 + $track_only_rules = implode(', ', $track_only_rules); 95 + $view->addProperty(pht('Track Only'), $track_only_rules); 96 + } 99 97 100 98 $publishing_disabled = $repository->isPublishingDisabled(); 101 99 if ($publishing_disabled) { ··· 134 132 $rows = array(); 135 133 foreach ($branches as $branch) { 136 134 $branch_name = $branch->getShortName(); 137 - $tracking = $repository->shouldTrackBranch($branch_name); 138 135 $permanent = $repository->shouldAutocloseBranch($branch_name); 139 136 140 137 $default = $repository->getDefaultBranch(); ··· 166 163 $icon, 167 164 $branch_name, 168 165 $status, 169 - $tracking ? pht('Tracking') : pht('Off'), 170 166 $permanent_status, 171 167 ); 172 168 } ··· 176 172 '', 177 173 pht('Branch'), 178 174 pht('Status'), 179 - pht('Track'), 180 175 pht('Permanent'), 181 176 )); 182 177 $branch_table->setColumnClasses( ··· 184 179 '', 185 180 'pri', 186 181 'narrow', 187 - 'narrow', 188 182 'wide', 189 183 )); 190 184 $branch_table->setColumnVisibility( ··· 192 186 true, 193 187 true, 194 188 $can_close_branches, 195 - true, 196 189 true, 197 190 )); 198 191