mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
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
This commit is contained in:
parent
cc626b0306
commit
4f26b8ffcf
2 changed files with 0 additions and 42 deletions
|
@ -31,10 +31,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
|
||||||
$test_paths = $this->getReleephProject()->getDetail('testPaths', array());
|
$test_paths = $this->getReleephProject()->getDetail('testPaths', array());
|
||||||
}
|
}
|
||||||
|
|
||||||
$release_counter = $request->getInt(
|
|
||||||
'releaseCounter',
|
|
||||||
$this->getReleephProject()->getCurrentReleaseNumber());
|
|
||||||
|
|
||||||
$arc_project_id = $this->getReleephProject()->getArcanistProjectID();
|
$arc_project_id = $this->getReleephProject()->getArcanistProjectID();
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
|
@ -52,10 +48,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
|
||||||
pht('You must specify which branch you will be picking from.');
|
pht('You must specify which branch you will be picking from.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($release_counter && !is_int($release_counter)) {
|
|
||||||
$errors[] = pht("Release counter must be a positive integer!");
|
|
||||||
}
|
|
||||||
|
|
||||||
$other_releeph_projects = id(new ReleephProject())
|
$other_releeph_projects = id(new ReleephProject())
|
||||||
->loadAllWhere('id <> %d', $this->getReleephProject()->getID());
|
->loadAllWhere('id <> %d', $this->getReleephProject()->getID());
|
||||||
$other_releeph_project_names = mpull($other_releeph_projects,
|
$other_releeph_project_names = mpull($other_releeph_projects,
|
||||||
|
@ -83,10 +75,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
|
||||||
->setDetail('commitWithAuthor', $commit_author)
|
->setDetail('commitWithAuthor', $commit_author)
|
||||||
->setDetail('testPaths', $test_paths);
|
->setDetail('testPaths', $test_paths);
|
||||||
|
|
||||||
if ($release_counter) {
|
|
||||||
$project->setDetail('releaseCounter', $release_counter);
|
|
||||||
}
|
|
||||||
|
|
||||||
$fake_commit_handle =
|
$fake_commit_handle =
|
||||||
ReleephBranchTemplate::getFakeCommitHandleFor($arc_project_id);
|
ReleephBranchTemplate::getFakeCommitHandleFor($arc_project_id);
|
||||||
|
|
||||||
|
@ -169,13 +157,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
|
||||||
->setValue($trunk_branch)
|
->setValue($trunk_branch)
|
||||||
->setName('trunkBranch')
|
->setName('trunkBranch')
|
||||||
->setError($e_trunk_branch))
|
->setError($e_trunk_branch))
|
||||||
->appendChild(
|
|
||||||
id(new AphrontFormTextControl())
|
|
||||||
->setLabel(pht('Release counter'))
|
|
||||||
->setValue($release_counter)
|
|
||||||
->setName('releaseCounter')
|
|
||||||
->setCaption(
|
|
||||||
pht("Used by the command line branch cutter's %%N field")))
|
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormTextAreaControl())
|
id(new AphrontFormTextAreaControl())
|
||||||
->setLabel(pht('Pick Instructions'))
|
->setLabel(pht('Pick Instructions'))
|
||||||
|
|
|
@ -68,10 +68,6 @@ final class ReleephProject extends ReleephDAO
|
||||||
$this->name,
|
$this->name,
|
||||||
implode(', ', $banned_names)));
|
implode(', ', $banned_names)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->getDetail('releaseCounter')) {
|
|
||||||
$this->setDetail('releaseCounter', 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadArcanistProject() {
|
public function loadArcanistProject() {
|
||||||
|
@ -120,25 +116,6 @@ final class ReleephProject extends ReleephDAO
|
||||||
'getRepositoryPHID');
|
'getRepositoryPHID');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrentReleaseNumber() {
|
|
||||||
$current_release_numbers = array();
|
|
||||||
|
|
||||||
// From the project...
|
|
||||||
$current_release_numbers[] = $this->getDetail('releaseCounter', 0);
|
|
||||||
|
|
||||||
// From any branches...
|
|
||||||
$branches = id(new ReleephBranch())->loadAllWhere(
|
|
||||||
'releephProjectID = %d', $this->getID());
|
|
||||||
if ($branches) {
|
|
||||||
$release_numbers = array();
|
|
||||||
foreach ($branches as $branch) {
|
|
||||||
$current_release_numbers[] = $branch->getDetail('releaseNumber', 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return max($current_release_numbers);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getReleephFieldSelector() {
|
public function getReleephFieldSelector() {
|
||||||
return new ReleephDefaultFieldSelector();
|
return new ReleephDefaultFieldSelector();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue