views:

421

answers:

3

I am a intermediate web developer, I am attempting to integrate subversion into my workflow. I have come to the understanding, that it is something important to learn, and can save me from rewrite issue nightmares in the future.

My current host is dreamhost I have setup subversion with them, and I have checked out the project(my syntax may be way off here) with versions(for the mac) and have been using coda(for the mac) to commit changes.

When I visit the directory my commits are stored in, on the server, they are rendered as plain text. Currently when I commit something I also ftp upload to a different directory, so I can view the actually site. I can rollback in coda to different versions and then upload via ftp.

I am not sure if I am doing this properly, am I still supposed to commit and ftp upload side by side, or can I just do the commits and have the most recent commit show up as a rendered webpage without touching ftp at all?

Do I make sense?

+1  A: 

You are correct. You want to commit your code to the repository, then ftp to the server where you want the changes to be. If you rollback your code in the repository, you can then ftp your changed files.

Quick question: Are you able to test your code locally? If not, you may want to go with this workflow:

  1. Make changes to code.
  2. Upload via ftp to a development directory on Dreamhost where you can view and test.
  3. If there are bugs, fix them and repeat.
  4. When your changes are working, commit your changes to subversion
  5. Then upload your files to the production directory (where things are live).

This way, you never accidentally ftp up broken code to your production environment.

Ken Earley
A: 

www.beanstalkapp.com is a hosted subversion service that can do all this for you. You can integrate it nicely with coda, then deploy from their site.

Take a look at it.

Jamis Charles
A: 

Since Dreamhost offers console access to most (all?) hosting accounts, you'd probably want to just have a checkout of your repo on the server that you can update after you commit from your local dev environment. So, something like this:

  • Make edits to local project
  • Commit local project to repo
  • SSH to Dreamhost, cd into the directory where your site lives
  • svn up

That's what I do (using almost exactly the same set of tools, minus Coda) and it works perfectly and you wouldn't have to mess with FTP.

inkedmn
Thanks! I think I will do this, it makes more sense to do as little gui type interface stuff while I am coding.
Anders Kitson