Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Billets libellés netbeans

Importing a SVN repository from one server to another one

As now I’m using Netbeans, I had issues with key based authentication for CVS project in Netbeans. That’s why I decide to import my CVS project to SVN. At some point, as the SVN repository was on my own personal computer, I decide to move it to a public server I had, but only allow SSH access to it. So here is the procedure to move a SVN repository to another SVN server, and only allow svn+ssh access ( no webdav, no network svnserve access ) under Mandriva.

  1. On your old SVN server, you have to dump the entire SVN repository : [bash light= »1″]svnadmin dump /path/to/your/repository > /tmp/repository.svn_dump[/bash]
  2. Now copy the dump file somewhere on the new SVN server. You may want to use scp if your SSH key based authentication is working correctly. For example : [bash light= »1″]scp /tmp/repository.svn_dump user@new-svn-server:/tmp[/bash]
  3. Once done, you may want to delete the dump file on the old server and eventually delete also the old SVN repo
  4. On your new server, install the SVN server package and its associated tools : [bash light= »1″]urpmi subversion-server subversion-tools[/bash]
  5. check that svnserve is not started at boot by xinetd. For this check /etc/xinetd.d/svnserve configuration file and check that you have disable = yes as follows : [plain]# default: off
    # description: svnserve is the server part of Subversion.
    service svnserve
    disable             = yes
    port                = 3690
    socket_type         = stream
    protocol            = tcp
    wait                = no
    user                = svn
    server              = /usr/bin/svnserve
    server_args         = -i -r /var/lib/svn/repositories
  6. Now create the repository tree on the new server : [bash light= »1″]svnadmin create /var/lib/svn/repositories/[/bash]
  7. Import the dumped repository file in the new SVN repository : [bash light= »1″]svnadmin load /var/lib/svn/repositories/ < /tmp/repository.svn_dump[/bash]
  8. If the importation is successful, now you should ensure that the users connecting with SSH will have write access to the repository. For this add the users to the svn group : [bash light= »1″]usermod -G svn -a user[/bash]
  9. Now add a default ACL for the group to the repository giving read, write and execute ( rwX ) rights to all members of the svn group : [bash light= »1″]setfacl -R -m d:g:svn:rwX /var/lib/svn/repositories/[/bash]
  10. Check that from a remote computer you can list the content of the repository : [bash light= »1″]svn list svn+ssh://user@new-svn-server/var/lib/svn/repositories[/bash]

Happy coding with Subversion 🙂

Ressources :

Netbeans : my new PHP IDE of choice

During a longPHP support dans Netbeans time my PHP development of choice was and the PHP plugin for Eclipse : Please note that there’s another PHP plugin for Eclipse developped by Zend and IBM : also known as the PHP Development Project. However I was mostly using Eclipse and phpeclipse as it was the first PHP plugin I used, and I did appreciate the native integration of CVS and team management tools.

However tonight I decide to give a try to Netbeans with PHP support. What can I say ? I just fall in love. Whereas I have to be used to the new syntax highlighting, PHP support in Netbeans is top for several reasons :

  • Netbeans seems to start faster than Eclipse and can also import Eclipse projects,
  • it support project creation from Zend or Symphony frameworks ( even if I don’t use them ),
  • it supports natively and easily PHP debugging ( with xdebug ) and PHPUnit/Selenium tests,
  • It allows Code Coverage,
  • It correctly support and parsed my CSS files or .sql files,
  • Even better … It allows to connect to your database, view its schema, table structures, and of course execute queries and test your migration SQL scripts,
  • it allows to search through a plugin directly in the PHP manual
  • it can dynamically parsed and handle your PHPDoc tags and then present your PHP file structure with the PHPDoc you add : this is a good insensitive to write correct PHPDoc,
  • Last but not least it provides native CVS and Mercurial integration

In only a few clicks I add way more features than with Eclipse and PHPEclipse. Whereas it’s possible to add xdebug support to eclipse and phpeclipse, the process is not automatic and can be somewhat hard. So finally I switched to Netbeans for my PHP dev. The procedure is very straightforward under Mandriva 2010 Spring as Netbeans packages is already available. Here is the procedure, under Mandriva 2010 Spring, to install Netbeans with a useful and complete PHP development environment :

  1. install the Netbeans 6.8 and its related packages with urpmi : [bash light= »yes »]urpmi netbeans[/bash]
  2. install PHPUnit, xdebug and Selenium : [bash light= »yes »]urpmi php-pear-PHPUnit php-xdebug php-pear-Testing_Selenium[/bash]
  3. restart Apache to activate the PHP extensions : [bash light= »yes »]service httpd restart[/bash]
  4. Now start Netbeans from the menu : Application -> Development -> Development Environment -> Netbeans IDE 6.8
  5. Once Netbeans have started, deline if you wish the registration, and then select on the right pane « Install Plugins« . Here is the list of plugins I did choose for my PHP development : Database, PHP, Php Manual Search, Selenium module for PHP. Installing plugins is very easy, just select them, and then follow the instructions ( most of the time hiting Next or validating a License ). Don’t forget to accept Php Manual and thus even if the plugin is considered as not trusted.
  6. Once your plugins have been installed, restart Netbeans. You may want to decline sending informations about you to Netbeans team.

Now you can import your old Eclipse projects, or if as me you are using a control version system, just checkout your repository ( Team -> CVS -> Checkout ). Mercurial and subversion are supported. For those willing to have Git support, they should have a look at the third party plugin : Netbeans Git Plugin ( homepage : Netbeans Git Module ). To add third parties plugins, download them as .nbm file, then install them with Tools -> Plugins -> [Downloaded] tab -> Add Plugins.

There’s one big caveat however :  Netbeans internal SSH client doesn’t support key authentification. You will have to use password authentification, or create a SSH tunnel. For further informations see

And now happy PHP coding with Netbeans 🙂


My Tweets