stable

Clone or download

Read-only

Create PATCH git/:id

This task is part of story #8887 migrate git to gerrit with REST route The PATCH route deals with migrate_to_gerrit and disconnect_from_gerrit. For the migration, if the request is OK, an event is launched to migrated the repository (we kept the same behaviour as defined in web UI). For the disconnect, we disconnect from gerrit the repository with options: * noop => does nothing * read => update gerrit project into READ-ONLY mod * delete => delete the gerrit project (throws an error if delete plugin not installed) You can also disconnect a repository not migrated without error. The lack of REST tests is due to system_event checking (we don't know how to do this in REST test context) Change-Id: I09c6ef75160e5691e474574a86991cf83510d464

Modified Files

Name
M plugins/git/include/Git.class.php +9 −1 Go to diff View file
A plugins/git/include/Git/RemoteServer/Gerrit/MigrationHandler.php +131 −0 Go to diff View file
M plugins/git/include/GitActions.class.php +16 −26 Go to diff View file
A plugins/git/include/REST/v1/GitRepositoryGerritMigratePATCHRepresentation.php +35 −0 Go to diff View file
M plugins/git/include/REST/v1/RepositoryResource.class.php +146 −7 Go to diff View file
M plugins/git/include/autoload.php +7 −2 Go to diff View file
A plugins/git/include/exceptions/DeletePluginNotInstalledException.php +25 −0 Go to diff View file
A plugins/git/include/exceptions/RemoteServerDoesNotExistException.php +26 −0 Go to diff View file
A plugins/git/include/exceptions/RepositoryNotMigratedException.php +26 −0 Go to diff View file
A plugins/git/tests/Git/RemoteServer/MigrationHandlerTest.php +156 −0 Go to diff View file
M plugins/git/tests/GitActionsTest.php +11 −68 Go to diff View file
M plugins/git/tests/rest/Git/RepositoryTest.php +1 −1 Go to diff View file
M plugins/svn/include/autoload.php +2 −2 Go to diff View file
M src/common/autoload.php +2 −2 Go to diff View file