Creating a new development project and managing it with Subclipse
Setting up Subversion repository explorer
-----------------------------------------
Open SVN Repository Exploring perspective: Window -> Open perspective - Other -> SVN Repository exploring. Add your Subversion repository root by clicking "Add new SVN repository" icon or through right click menu. After this you should be able to browse the whole Subversion repository in SVN Repository Exploring perspective.
Creating a new project from scratch
-----------------------------------
Choose File -> New PyDev project. Type in the project name and choose Python 2.4.
Use `paster to create the project skeleton <http://plone.org/documentation/how-to/use-paster>`_ on your Eclipse project folder.
In SVN Repository Exploring perspective, create Subversion project with the following structure through right click menu::
svnroot
myproject
branches
trunk
tags
You might need to refresh SVN Explorer after changes by right click -> Refresh.
Right click the project and choose Team -> Share project. Choose SVN repository type and svnroot/myproject/trunk for the target.
Creating a project from the existing Subversion branch
------------------------------------------------------
If you have files already in Subversion repository you can checkout them from Eclipse IDE. Go to SVN Repository Exploring perspective. Navigate to your branch (trunk). Right click and choose "Checkout". Choose "Use New Project wizard" and PyDev project. Type in the project name and configure the project for Python 2.4.
.. image:: /documentation/tutorial/developing-plone-with-eclipse/snapshot2.png
:width: 320
:height: 240
:target: /documentation/tutorial/developing-plone-with-eclipse/snapshot2.png
*SVN Exploring Perspective*
Setting up Buildout src target
------------------------------
The last thing to do is to configure buildout to find the products from your separate development project.
Open buildout.cfg in the Eclipse text editor.
For old-style products (lying inside Products namespace), add lines::
[instance]
...
products =
${buildout:directory}/products
${productdistros:location}
${plone:products}
../mydevprojectcontainingproductsfolderwithnestedmyproduct
[omelette]
recipe = collective.recipe.omelette
eggs = ${instance:eggs}
products =
${instance:products}
../mydevprojectcontainingproductsfolderwithnestedmyproduct
For new-style products, configure related ZCML slugs and develop directories. You need to touch the following buildout directives (freearch.theme product as an example)::
[buildout]
...
eggs =
...
freearch.theme
develop =
../freearch/freearch.theme
[instance]
...
zcml =
freearch.theme
Problems with setuptools and Subversion 1.5
-------------------------------------------
If you're using setuptools-0.6c8 with SVN 1.5, you might be hit by this error message::
File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 98, in entries_finder
log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined
While:
Installing.
This is a bug and it's fixed in setuptools-0.6c9, so please upgrade. See
`this thread <http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/b5d23c96e328b178796fd556351da9ca?lnk=rao>`_ and `this bug report <http://bugs.python.org/setuptools/issue4>`_ for additional information.
