Give users a modal VCS choice when creating a new repository
Summary:
Ref T10748. Allow the new EditEngine workflow to create repositories by giving the user a modal repository type choice upfront.
(The rest of this flow is still confusing/weird, though.)
Test Plan:
- Created a new repository.
{F1249626}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10748
Differential Revision: https://secure.phabricator.com/D15813
This commit is contained in:
@@ -5,6 +5,17 @@ final class DiffusionRepositoryEditEngine
|
||||
|
||||
const ENGINECONST = 'diffusion.repository';
|
||||
|
||||
private $versionControlSystem;
|
||||
|
||||
public function setVersionControlSystem($version_control_system) {
|
||||
$this->versionControlSystem = $version_control_system;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getVersionControlSystem() {
|
||||
return $this->versionControlSystem;
|
||||
}
|
||||
|
||||
public function isEngineConfigurable() {
|
||||
return false;
|
||||
}
|
||||
@@ -27,7 +38,14 @@ final class DiffusionRepositoryEditEngine
|
||||
|
||||
protected function newEditableObject() {
|
||||
$viewer = $this->getViewer();
|
||||
return PhabricatorRepository::initializeNewRepository($viewer);
|
||||
$repository = PhabricatorRepository::initializeNewRepository($viewer);
|
||||
|
||||
$vcs = $this->getVersionControlSystem();
|
||||
if ($vcs) {
|
||||
$repository->setVersionControlSystem($vcs);
|
||||
}
|
||||
|
||||
return $repository;
|
||||
}
|
||||
|
||||
protected function newObjectQuery() {
|
||||
|
||||
Reference in New Issue
Block a user