views:

30

answers:

2

i use netbeans to check out projects from svn repo, then i edit the files and commit the changes. but how should i do to update the live web server content (in /var/www)?

should i in my ubuntu server use "svn checkout" and check it out to /var/www or should i use netbeans to check out to a local folder and then upload the files to /var/www with ftp or webdav (and which one of them should i use)?

+3  A: 

If you are rolling out changes to a production server, you should not be checking out changes from SVN directly. Instead, I recommend you package up your application as an apt package, RPM, etc. Then use the package to install (or update) the application on the live server. That way you can track what version of the software is installed, and you will have more control over the upgrade process.

If this is a development server, you can use netbeans to automatically upload content to a remote server when you 'run' or 'debug' the project. Just go to project properties | runtime configuration - I recommend using sftp instead of ftp. In any case this is great because as you make changes it will only upload the modified files.

Justin Ethier
+1  A: 

An alternative would be svn export, which pulls down the code without any versioning.

mmsmatt