views:

446

answers:

3

I have Eclipse PDT with Subclipse installed and currently have a PHP project drawing from a repository on my production server. I have VMWare Workstation installed with Linux and was hoping to use that as a debug server using XDebug. The problem is that when I update files, they are only committed to the repository on my production server. How can I test the setup on the VM linux? Is it possible to commit the changes to two repositories? Is there a better way of doing this?

A: 

You can create a post-commit hook on the repository-machine, which tells the dev-machine to update its revision.

troelskn
+1  A: 

I think you may be confusing the concept of a repository and a working copy. There should only be one repository for a project. The repository is basically just a central copy of your code base. You checkout the code from the repository to your debug server. When you make changes to your source code you will commit them and they go to the repository. You then run an svn update on the debug server working copy to get the latest changes to test with.

D-Rock
+1  A: 

If you have your working copy on the host and not in the guest (VM), the easiest way is to use the shared folders in the VM... Setup your shared folder to point to your projects folder on the host, or a subfolder where you have your working copy. Inside the VM you can link your www-root eg. to /var/www/myproject.com to have the same path as on your production server. So you have only 1 working copy shared with your test server inside the VM.

You can also use SSH (or FTP) and access your web on the host with SFTP (or FTP). For this you must install on your host a SSH-/FTP server. Inside your VM you can use fuse with SSH/FTP to mount the connection to a local path, for easy access with the webserver.

You can also work with 2 working copies (one on your host and one inside your VM). But this needs more work, because you must sync both.

You can also change the direction and have one working copy in your VM. For this the easiest way is to access your VM with SSH (SFTP) and use on your host a tool which can mount SFTP as a drive (eg. Webdrive).

devarni