To do the syncing of your local copy to the centralized Repository, you need a Team Provider in Eclipse. Each type of central repository has it's own implementation of a Team Provider:
- - for CVS: built into Eclipse
- for SVN: Subversive, Subclipse (See: viewtopic.php?f=38&t=11052)
- for Servoy Repository: Servoy Team Provider (comes with Servoy in Eclipse (aka "Serclipse"))
The typical LifeCycle of a Solution using a Team Provider is the following:
For a New Solution:
- A1- Create new solution in Serclipse: the solution will live only in your local workspace
A2- Share the solution with a central repository: A solution can be shared (=linked) to only 1 central repository. Once connected to a repository, you can always unshare again, if needed.
A3- Commit the solution: since it’s the first commit of a new solution, you commit everything
A4- Continue development
A5- from here, the lifecycle continues below at B3
Existing solution in Repository:
- B1- Checkout solution from Repository into your local workspace
B2- Continue development locally.
B3- Call synchronize to see differences between local copy and Repository (other developers might have committed changes to the central repository since you checked out the solution)
B4a- Update to get all non conflicting changes from the Repository into your local workspace
B4b- If there are conflicts:
- - Overwrite: to copy the version of the Repository over to your local workspace, overwriting your local version
- Merge: to copy the Repository version of the code for one conflict over to your local environment, overwriting just that one conflict
- Mark as Merged: to manually mark the entire local copy as merged with the repository version. When you have called this on a local file, you basically mark the local file as leading and when you then commit the local version, it will disregard conflicts and update the Repository version, overwritting the changes other developers have did in the repository
B6- Continue development locally and the lifecycle continues at B3
Two statements to make things crystal clear:
- - The only thing to ever update the Repository (either SVN/CVS/Servoy) from Eclipse is a commit command. All other actions do NOT update the Repository.
- When synchronizing, conflicts only arise when the central repository was updated by another developer since the last time you have been in sync with the Repository
Servoy and Team Support:
In Eclipse, you work on projects. In Servoy terms you work on Solutions, which can be modules. When using Serclipse an Eclipse project equals a Servoy solution. Besides that, there is also a Resource Project in Serclipse, that contains all info not related to a specific Servoy Solution, but more to a development server (can be localhost).
- Resource projects:
A Resources project is a project in Eclipse in which all information is stored that is not specific to a particular Servoy Solution/Module, so for example info on columns of tables, Security info (groups, users and security settings on table level) and StyleSheets
Natures:
For projects in Eclipse to be recognized as a solution or module by Serclipse, the project needs to have a “Servoy solution” nature. When you create a new Solution through Serclipse or checkout a Solution from the Servoy Repository, this behavior gets added automatically. The behavior is stored in the (hidden) .project file on each project in Eclipse. Also see the note under “Using SVN/CVS/Other, instead of Servoy Repository Team provider“
For projects in Eclipse to be recognized as a Servoy Resources project, the project needs to have a “Servoy Resources” nature. When you create a new Solution through Serclipse or checkout a Solution from the Servoy Repository, the Resources project is automatically created/checked out as well and this behavior gets added automatically. The behavior is stored in the (hidden) .project file on each project in Eclipse. Also see the note under “Using SVN/CVS/Other, instead of Servoy Repository Team provider“
Servoy Team Provider:
The Servoy Team Provider is designed to work specifically with Serclipse and offers some features that other Team Providers do not offer:
- - The Servoy Team Provider automatically takes into account modules of a Solution when performing Team actions like syncronize/commit/update
- The Servoy Team Provider automatically takes into account the Resources project of a Solution when performing Team actions like syncronize/commit/update
- The Servoy Team Provider automatically updates the Resources project when you check out a solution/module from the Servoy Repository.
- - “When synchronize/commit/update solution, also do it on resources”: By default, this flag is on and therefore, the Resources project stays in sync. When not working on the datamodel, security or styles, you can turn off this flag for quicker Team Support actions
- “When synchronize/commit/update solution, also do it on Modules”: By default, this flag is on. You can uncheck this option if you want to work on a specific solution only, not taking it's modules into account.
- “When checkout solution, also update resources”: Speaks for itself, based on explanation on the previous item
Using the Servoy Repository with the Servoy Team Provider with multiple developers:
The Servoy Repository and Servoy Application Server that are part of your local Servoy Development environment are not suiteable to act as the central repository for team development. To use the Servoy Repository with multiple developers, you need to setup a dedicated Servoy Application Server and set the servoy.application_server.startRepositoryAsTeamProvider property on the Admin pages to “true”.
TIP: set the property to “false” on your local developer: it saves startup time
Using SVN/CVS/Other, instead of Servoy Repository Team provider:
When not using the Servoy Repository as the central repository you both loose and gain functionality and there are a couple of things that you need to take into account:
- - Other team providers than the Servoy Team Provider do not know about the relation between solutions, their modules and the link to the Resources project. Therefor, you as a developer have to manually perform all team actions on each project separately
- The team providers for SVN and CVS offer rich functionality in the area of maintaining multiple versions and branches of the same solution, with a full history of who changed what when.
- Make sure .project files are also added to the Repository of your choice, because that stores the Natures attached to projects that Serclipse needs to work properly.
Hope this will get you some more insight in team development and that it will jumpstart your development in 4.0.
Regards,
Paul