SVN repository Import for Unix users

A quick, step by step guide on importing a new product into the Plone SVN Collective repository.

Assumptions

I'm assuming that your product is called 'ProductName', it exists in the 'Products' directory of your zope instance and that all actions are done in the zope instance directory (on my Ubuntu Breezy machine, my default zope instance is '/var/lib/zope2.8/instance/plone-site'.

  • You have subversion installed
  • You are using Linux,BSD,*nix....
  • You have a username and password for plone.org (you'll need this when checking in)

I'll use the convention {plone-username}, you will need to replace this with your plone.org username.

Initial Configuration

The subversion configuration file should be setup to make sure that End of Line characters work properly for Windows users. This is done by making relevant End of Line entries in your subversion config file.

My '~/.subversion/config' file looks like this:

[miscellany]
enable-auto-props = yes

[auto-props]
*.gif = svn:mime-type=image/gif
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.txt = svn:eol-style=native
*.py = svn:eol-style=native
*.cpy = svn:eol-style=native
*.vpy = svn:eol-style=native
*.pt = svn:eol-style=native
*.cpt = svn:eol-style=native
*.dtml = svn:eol-style=native
*.zcml = svn:eol-style=native
*.js = svn:eol-style=native
*.metadata = svn:eol-style=native

1. Preparing your Product

For this example, all actions were done from within my instance home.

make a clean local copy of your product:

mkdir -p importer/ProductName/trunk importer/ProductName/branches importer/ProductName/tags

IMPORTANT!!! make sure all .pyc files are removed from your product:

find ./Products/ProductName -name  '*.pyc' -exec rm {}  \;

Add the contents of your product to the importer directory:

cp Products/ProductName/* importer/ProductName/trunk/

2. Importing your Product

Import to the svn:

svn import importer https://svn.plone.org/svn/collective/ --username {plone-username} -m 'initial import'

or:

cd importer
svn import ProductName https://svn.plone.org/svn/collective/ProductName --username {plone-username} -m 'initial import'

I definitely prefer the first way, since you can use the same command, regardless of the product name.

You will be prompted for your plone.org password (This is from your plone.org account). The new repository will be available at https://svn.plone.org/svn/collective/ProductName.

Working with your product

To check out the product for working run the following:

svn co https://svn.plone.org/svn/collective/ProductName/trunk ProductName

more for .subversion/config

Posted by Maurits van Rees at Nov 29, 2006 01:24 PM
*.metadata = svn:eol-style=native
*.js = svn:eol-style=native
*.dtml = svn:eol-style=native

import

Posted by Christian Ledermann at Jan 19, 2007 10:16 AM
It is not:
svn import importer https://svn.plone.org/svn/collective/

but:
svn import importer https://svn.plone.org/svn/collective/importer

replace importer with your projectname