SVN Integration in FESA's Eclipse Plugin
- To work with the GSI's SVN repository the first thing you need is a valid Linux account for GSI's ACC cluster. If you do not have an account, please refer to CS-CO-IN, the infrastructure team (ChristophHandel or SteffenSteinmetz)
- In order to use the automatic SVN project integration and other FESA Eclipse plug-in features you need to enter your user credentials in the FESA preferences:
- Window --> Preferences --> FESA --> Repository
SVN repositories
The SVN URLs for FESA3 classes and deploy-units are automatically added by the FESA3 Eclipse plug-in.
Those URLs are used during deployment of (operational) FESA3 software.
How to check-out an existing FESA project
- Switch the Eclipse perspective: Window --> Open Perspective --> Other --> SVN Repository Exploring
- Open the "class" or the "deploy-unit" repository
- Open the folder of the project you want to Oheck Out
- Right click on trunk and select Check Out
How to commit your FESA project to SVN
The simplest way to integrate your project into the SVN repository is to check the box "Share project in repository" during FESA class/deploy-unit creation. The required SVN structures (trunk/branches/tags) automatically will be created. On success Eclipse's Project Explorer will display the SVN repository URL for each project that is shared in the repository.
- If there is no SVN structure yet in the SVN repository
- You can easily create such a structure by hand:
- Right-click on the repository of your choice
- Select: New --> Project Structure ...
- Select "Single Project or multiple projects layout"
- Put in the name of your class/deploy-unit
- Press "ok"
- Project is not connected to SVN
- If your project is connected to SVN, a small yellow cylinder on your project's icon in the Eclipse Project Explorer is displayed and the SVN repository URL is visible
- If this is not the case, do the following:
- Right click on your project and select: Team --> Share Project...
- SVN
- Pick the proper repository for a FESA class or a FESA deploy-unit
- Use "Simple Mode", push "browse" and search for your project
- select the "trunk" folder ( or a branch if you do not work in the trunk )
- If the project already exists in SVN, a warning dialog will be displayed. Click "Continue".
- Now a list of files to be committed to the repository will be shown .. either commit the checked files or continue reading on the next bullet of this list
- Commit changes
- Right click on the project and select Team --> Commit
- Now a list of files will be shown which are different from the ones in SVN or were never committed to the repository
- Pick the desired files, enter a commit message an press "OK" to commit your code to the SVN repository
- Do not commit any binary files, zip files, libraries and the files which are automatically generated by FESA! Check this list if you are not sure.
How to create a Branch / Tag
In Subversion branches and tags simply can be created by using the command "svn copy". A 'branch' usually is created by doing a copy of the 'trunk' (which then can be modified independently ) .A 'tag' usually is a snapshot of a 'branch' in order to freeze a certain implementation, e.g. store a released version.
Creating a new branch:
- Switch the Eclipse perspective: Window --> Open Perspective --> Other --> SVN Repository Exploring
- Right click on the repository of your choice
- Select the project to create a branch of and open the "branches" folder
- Right click on 'branches', select : "New --> Folder ... " and pick a name for your branch
- Mark all files in the 'trunk' and select 'copy' from the right click menu
- Right-click on your new branch and select 'paste'
- Please provide a commit message
With the same procedure a 'tag' can be created.
An alternative way:
- Switch the Eclipse perspective: Window --> Open Perspective --> Other --> SVN Repository Exploring
- Right click on the repository of your choice
- Select the project to create a branch of and open the "branches" folder
- Right click on 'branches', select : "New --> Folder ... " and pick a name for your branch
- Right click on 'trunk', select New --> Branch... and selet the desired branch / tag.
Using the command line interface for branching and tagging
For those who prefer working on the command line the following lines illustrate how to create branches or tags from the trunk of a project:
svn copy https://www-acc.gsi.de/svn/fesa/device/deploy-unit/<FESA deploy-unit>/trunk https://www-acc.gsi.de/svn/fesa/device/deploy-unit/<FESA deploy-unit>/tags/V0_1_0 -m "Tag of operational version V0_1_0"
svn copy https://www-acc.gsi.de/svn/fesa/device/deploy-unit/<FESA deploy-unit>/trunk https://www-acc.gsi.de/svn/fesa/device/deploy-unit/<FESA deploy-unit>/branches/<A useful name> -m "Branched for testing useful features"
How to add files/folders to svn:ignore
Some files should not be shared in the SVN, e.g. binary files and files which are automatically generated by FESA. The FESA Eclipse plug-in automatically creates svn:ignore entries. The files/folders that should not be committed to the SVN repository are:
- the folder "generated"
- the folder "bin"
- the folder "build"
- the folder "precompiled"
- the file "Makefile"
- the file "Makefile.dep"
- any kind of symbolic link
- zip files
- compiled binaries
- any other file that does not belong to the FESA project
If you want to tell SVN to automatically ignore files, you can do this by:
- Right click on the file to be ignored
- Select "Team-->Add to svn:ignore..."
- Use "resource by name" to ignore this specific file.
- Before commit, make sure you added all files to svn:ignore that should be ignored
- Update your project by right clicking on it: "Team-->Update" (this is neccessary before the changes for svn:ignore can be commited)
- Commit the changes by right clicking on the project: "Team-->Commit"
Check the
SVN internal information sub-page for more information.