You are here: Home / Documentation / How To's / Using mr.developer with Plone 4.1

Using mr.developer with Plone 4.1

by nguyen — published Aug 11, 2011 11:30 PM, last modified Aug 16, 2016 10:50 AM
mr.developer is a package that helps coders work on Plone products that are held in a code repository

I decided finally to give mr.developer a try (also see this page for context on how to use mr.developer) The Plone 4.1 unified installer includes mr.developer if you use the develop.cfg, e.g.

bin/buildout -c develop.cfg

To try mr.developer out on two products I just created, I added this to the [sources] section in develop.cfg:

uwosh.securelogin = svn https://svn.it.uwosh.edu/svn/plone/Projects/uwosh.securelogin/trunk
uwosh.secureloginportlet = svn https://svn.it.uwosh.edu/svn/plone/Projects/uwosh.secureloginportlet/trunk

I also wanted to try out the Products.PdbDebugMode product, which puts you inside a pdb if an exception is thrown, so I add this to the eggs section:

    Products.PDBDebugMode

Then I ran

bin/buildout -c develop.cfg

but got this error:

bash-3.2$ bin/buildout -c develop.cfg
mr.developer: Queued 'uwosh.securelogin' for checkout.
mr.developer: Queued 'uwosh.secureloginportlet' for checkout.
mr.developer: Subversion info for 'uwosh.securelogin' failed.
mr.developer: svn: '/Users/kim/Plone-4.1/zinstance/src' is not a working copy
mr.developer:
mr.developer: Subversion info for 'uwosh.secureloginportlet' failed.
mr.developer: svn: '/Users/kim/Plone-4.1/zinstance/src' is not a working copy
mr.developer:
mr.developer: There have been errors, see messages above.
This is how I got past that error, by "svn activating" the src directory:
bash-3.2$ cd src
bash-3.2$ svn co --depth empty https://svn.it.uwosh.edu/svn/plone/Projects .
 U   .
Checked out revision 2582.
Then this worked:
bash-3.2$ bin/buildout -c develop.cfg
mr.developer: Queued 'uwosh.securelogin' for checkout.
mr.developer: Queued 'uwosh.secureloginportlet' for checkout.
mr.developer: Checked out 'uwosh.secureloginportlet' with subversion.
mr.developer: Checked out 'uwosh.securelogin' with subversion.
Develop: '/Users/kim/Plone-4.1/zinstance/src/uwosh.secureloginportlet'
Develop: '/Users/kim/Plone-4.1/zinstance/src/uwosh.securelogin'
warning: no previously-included files matching '*pyc' found anywhere in distribution
Updating _mr.developer.
...

In the src directory I could see both products.

OK, now I want to develop a new product, so it's recommended that I just create it in the src directory. I use paster to create a uwosh.blotter product, a combination of blogging and Twitter, and inside it I create a content type called "Blot" (a blog / tweet):

cd src
bash-3.2$ ../../Python-2.6/bin/paster create -t archetype
bash-3.2$ cd uwosh.blotter/
bash-3.2$ ../../../Python-2.6/bin/paster addcontent contenttype
bash-3.2$ cd ../..
bash-3.2$ bin/buildout -c develop.cfg 
bash-3.2$ bin/buildout -c develop.cfg 
mr.developer: Queued 'uwosh.blotter' for checkout.
mr.developer: Filesystem package 'uwosh.blotter' doesn't need a checkout.
Develop: '/Users/kim/Plone-4.1/zinstance/src/uwosh.blotter'
...

OK, so what else do we get? A new utility:

bash-3.2$ bin/develop -h
usage: develop [-h] [-v]  ...

optional arguments:
  -h, --help        show this help message and exit
  -v, --version

commands:

    activate, a     Add packages to the list of development packages.
    checkout, co    Checkout packages
    deactivate, d   Remove packages from the list of development packages.
    help, h         Show help
    info            Lists informations about packages.
    list, ls        Lists tracked packages.
    rebuild, rb     Run buildout with the last used arguments.
    reset           Resets the packages develop status.
    status, stat, st
                    Shows the status of tracked packages.
    update, up      Updates all known packages currently checked out.
bash-3.2$ bin/develop info
Name: uwosh.blotter
Path: /Users/kim/Plone-4.1/zinstance/src/uwosh.blotter
Type: fs
URL: uwosh.blotter

bash-3.2$ bin/develop ls
uwosh.blotter
bash-3.2$ bin/develop st
      uwosh.blotter
Navigation