Neos.Neos/Classes/Command/WorkspaceCommandController.php
public function rebaseCommand($workspace, $baseWorkspace)
    {
        $workspaceName = $workspace;
        $workspace = $this->workspaceRepository->findOneByName($workspaceName);
        if (!$workspace instanceof Workspace) {
            $this->outputLine('Workspace "%s" does not exist', [$workspaceName]);
            $this->quit(1);
        }

        $baseWorkspaceName = $baseWorkspace;
        $baseWorkspace = $this->workspaceRepository->findOneByName($baseWorkspaceName);
        if (!$baseWorkspace instanceof Workspace) {
            $this->outputLine('The base workspace "%s" does not exist', [$baseWorkspaceName]);
            $this->quit(2);
        }

        $workspace->setBaseWorkspace($baseWorkspace);
        $this->workspaceRepository->update($workspace);

        $this->outputLine('Set "%s" as the new base workspace for "%s".', [$baseWorkspaceName, $workspaceName]);
    }
public function rebaseCommand($workspace, $baseWorkspace)
    {
        $workspaceName = $workspace;
        $workspace = $this->workspaceRepository->findOneByName($workspaceName);
        if (!$workspace instanceof Workspace) {
            $this->outputLine('Workspace "%s" does not exist', [$workspaceName]);
            $this->quit(1);
        }

        $baseWorkspaceName = $baseWorkspace;
        $baseWorkspace = $this->workspaceRepository->findOneByName($baseWorkspaceName);
        if (!$baseWorkspace instanceof Workspace) {
            $this->outputLine('The base workspace "%s" does not exist', [$baseWorkspaceName]);
            $this->quit(2);
        }

        $workspace->setBaseWorkspace($baseWorkspace);
        $this->workspaceRepository->update($workspace);

        $this->outputLine('Set "%s" as the new base workspace for "%s".', [$baseWorkspaceName, $workspaceName]);
    }
public function rebaseCommand ( $ workspace , $ baseWorkspace ) { $ workspaceName = $ workspace ; $ workspace = $ this -> workspaceRepository -> findOneByName ( $ workspaceName ) ; if ( ! $ workspace instanceof Workspace ) { $ this -> outputLine ( 'Workspace "%s" does not exist' , [ $ workspaceName ] ) ; $ this -> quit ( 1 ) ; } $ baseWorkspaceName = $ baseWorkspace ; $ baseWorkspace = $ this -> workspaceRepository -> findOneByName ( $ baseWorkspaceName ) ; if ( ! $ baseWorkspace instanceof Workspace ) { $ this -> outputLine ( 'The base workspace "%s" does not exist' , [ $ baseWorkspaceName ] ) ; $ this -> quit ( 2 ) ; } $ workspace -> setBaseWorkspace ( $ baseWorkspace ) ; $ this -> workspaceRepository -> update ( $ workspace ) ; $ this -> outputLine ( 'Set "%s" as the new base workspace for "%s".' , [ $ baseWorkspaceName , $ workspaceName ] ) ; }
Rebase a workspace

This command sets a new base workspace for the specified workspace. Note that doing so will put the possible
changes contained in the workspace to be rebased into a different context and thus might lead to unintended
results when being published.

@param string $workspace Name of the workspace to rebase, for example "user-john"
@param string $baseWorkspace Name of the new base workspace
@return void
Rebase a workspace