Importing a WOLips Project into Subversion Repository


Simple tutorial on how to do an initial import of an existing WebObjects project into a Subversion repository using the Subclipse plugin. At time of writing I had latest subversion (1.4.4) and subclipse (1.2.3) installed.

In Package Explorer view simply right-click the project and select Team/Share Project... from the context menu.



Select the SVN repository plugin



Select an existing or add a repository definition to your workspace



Following standard svn conventions, select the "Use specified folder name" option and type PROJECT_NAME/trunk. Subclipse will automatically create the specified folder path including all intermediate folders that do not exist in the repository.



Click Finish and you will be presented with the commit dialog. Enter a commit comment such as "Initial import." and *uncheck* derived files and directories such as the bin and dist directories that you do *not* want version control on. Also files like PB.project, etc. that are auto-generated may want to be unchecked at this time.




Now go ahead and switch to Navigator view (Window/Show View/Navigator) so we can see all files including the ones that are normally filtered from view in the Package Explorer View.

Next execute a Replace With Latest on the project:



Select "Yes To All"...




Next do a project clean/rebuild to ensure binaries and derivative resources are rebuilt. This is especially important for frameworks that have other projects in the workspace that depend on them.

Now those autogenerated dirs and files get generated again (note that build dir is automatically ignored by Subclipse) and they get decorated with little ?'s to show that they are unversioned. Right-click on each of these and add them to "svn:ignore"







After doing this we have a black asterisk ("dirty") decorator on the project folder itself. that is because the svn ignore actions added properties to that folder. To commit the changes, first perform an Update by right-clicking on the project and selecting Team/Update. If you don't do an Update at this point prior to commit, you will get an error and the commit will not execute. Don't worry, that is the beauty of Subversion is that commits are transactional, so it is all or nothing.

Next do a commit: right-click project and select team/Committ..



Repository Convention
In line with conventions, you may want to also create branches and tags directories for the project in the repository. Simply open the SVN Repository view and use the context menu to create remote folders in the repository with an end result something like this:



OK, I hope this tutorial has been useful for Subclipse newcomers.

Corrections/comments can be emailed to me at kieran_lists (at) mac (dot) com





Posted: Thu - July 5, 2007 at 02:36 PM        


Published by