@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.

Remove "Release Counter" from Releeph

Summary: Fixes T3658. This field doesn't make much sense and doesn't appear to ever have actually been implemented. Particularly, the `%N` pattern doesn't actually work and I can't find anything which actually calls this stuff or exposes it externally. Facebook doesn't use it (see T3658) and I don't think it's useful in general.

Test Plan: Used `grep` to look for stuff, edited a project.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T3658

Differential Revision: https://secure.phabricator.com/D8628

-42
-19
src/applications/releeph/controller/project/ReleephProjectEditController.php
··· 31 31 $test_paths = $this->getReleephProject()->getDetail('testPaths', array()); 32 32 } 33 33 34 - $release_counter = $request->getInt( 35 - 'releaseCounter', 36 - $this->getReleephProject()->getCurrentReleaseNumber()); 37 - 38 34 $arc_project_id = $this->getReleephProject()->getArcanistProjectID(); 39 35 40 36 if ($request->isFormPost()) { ··· 50 46 $e_trunk_branch = pht('Required'); 51 47 $errors[] = 52 48 pht('You must specify which branch you will be picking from.'); 53 - } 54 - 55 - if ($release_counter && !is_int($release_counter)) { 56 - $errors[] = pht("Release counter must be a positive integer!"); 57 49 } 58 50 59 51 $other_releeph_projects = id(new ReleephProject()) ··· 82 74 ->setDetail('branchTemplate', $branch_template) 83 75 ->setDetail('commitWithAuthor', $commit_author) 84 76 ->setDetail('testPaths', $test_paths); 85 - 86 - if ($release_counter) { 87 - $project->setDetail('releaseCounter', $release_counter); 88 - } 89 77 90 78 $fake_commit_handle = 91 79 ReleephBranchTemplate::getFakeCommitHandleFor($arc_project_id); ··· 169 157 ->setValue($trunk_branch) 170 158 ->setName('trunkBranch') 171 159 ->setError($e_trunk_branch)) 172 - ->appendChild( 173 - id(new AphrontFormTextControl()) 174 - ->setLabel(pht('Release counter')) 175 - ->setValue($release_counter) 176 - ->setName('releaseCounter') 177 - ->setCaption( 178 - pht("Used by the command line branch cutter's %%N field"))) 179 160 ->appendChild( 180 161 id(new AphrontFormTextAreaControl()) 181 162 ->setLabel(pht('Pick Instructions'))
-23
src/applications/releeph/storage/ReleephProject.php
··· 68 68 $this->name, 69 69 implode(', ', $banned_names))); 70 70 } 71 - 72 - if (!$this->getDetail('releaseCounter')) { 73 - $this->setDetail('releaseCounter', 0); 74 - } 75 71 } 76 72 77 73 public function loadArcanistProject() { ··· 118 114 new PhabricatorRepository(), 119 115 'phid', 120 116 'getRepositoryPHID'); 121 - } 122 - 123 - public function getCurrentReleaseNumber() { 124 - $current_release_numbers = array(); 125 - 126 - // From the project... 127 - $current_release_numbers[] = $this->getDetail('releaseCounter', 0); 128 - 129 - // From any branches... 130 - $branches = id(new ReleephBranch())->loadAllWhere( 131 - 'releephProjectID = %d', $this->getID()); 132 - if ($branches) { 133 - $release_numbers = array(); 134 - foreach ($branches as $branch) { 135 - $current_release_numbers[] = $branch->getDetail('releaseNumber', 0); 136 - } 137 - } 138 - 139 - return max($current_release_numbers); 140 117 } 141 118 142 119 public function getReleephFieldSelector() {