views:

52

answers:

1

Hi folks,

Sorry if this is a really easy question or something. As you can tell, I'm a complete novice to Subversion (but hey, we all have to start somewhere, right?).

So I've setup Subversion using Beanstalk + Coda for my webapp, which up until now I've just been managing locally and manually. So I've got it set up successfully and in my local folder, alongside my CodeIgniter installation, I can see the branch/trunk/commit folders.

Now I've been told that you should save all your working files in the trunk folder. However, I still want to test the site locally with my MAMP installation. Does that mean I need to copy my entire site into the trunk folder, change MAMP's root URL to mysitefolder/trunk and run it from there - thus saving any changes automatically to trunk?

Because that way, when I need to push changes to the FTP server - live changes for the actual webapp the users will use - I'll need to manually move/copy the files out of trunk and into the root, then FTP them up.

That strikes me as a bit of an illogical workflow. Am I going about this incorrectly, or is that really what you'd have to practically do?

Thanks !

Jack

P.S. I noticed whilst tagging this question that 'subversion' isn't an available tag. Why's that?

+3  A: 

Generally speaking the svn server would be set-up on your remote server and you wouldn't need to use FTP at all. You would create the repository on the server, do a local checkout of the files to your local root directory. Once they are there you can work on them locally until you are happy with them, at which point you would commit them to the remote server. Then on your server you would probably have a cron job or other service that will copy the files from your branch directory of your repository, to the actual document root folder of your site, this would run at say midnight every day, to ensure the site gets updated daily.

If you didn't want to go this whole hog, or don't have the ability to install an SVN server on your remote server then the local alternative would be to use the same process with regards to checkout and commit, but then using SVN export to get a copy of the files (sans the .svn folders) to upload via FTP when you are ready to push the changes live.

At least that's my understanding of the work flow. Hope it helps.

Cags
That is *really* clever. I didn't think of the site auto-updating itself. You, sir, are awesome. I'm on MediaTemple's (GS) and, it seems, although technically shared it's still possible for me to run SVN on it: http://kb.mediatemple.net/questions/143/Using+Subversion
Jack Webb-Heller