tags:

views:

93

answers:

2

This is for general websites development (LAMP Stack), not necessarily web applications though.

I'm just trying to setup some version control for client websites im building. Just trying to figure out the best way -- well how to do this...

I don't know how to setup SVN on my server. Do I have to do an additional step to push what's in trunk to the directory that the domain uses?

Noob alert: I have an idea of what Im trying to do but if I'm not giving enough details let me know I'll update..

A: 

No. You should build WAR file, probably save it into something like Maven repo and then deploy that. Now - I'm talking J2EE I don't really know which technology you have in mind. But anyway - SVN is for your source code and resources, not for executable code. Plus - trunk is for your latest code (development) you probably want to create a release branch for production deployment

OK. LAMP. I would still use some sort of publishing to move files from SVN to wherever you want to deploy it. Ant, Maven - something like that. It's generally not a good idea to map your SVN repo to your webserver, you want to keep distro and source separate. Said that - the folder structure can be identical

DroidIn.net
I think he's asking more of a branching question, but it's pretty vague, so it's hard to tell.
Michael Petrotta
LAMP Stack =] For now =]
codeninja
Agreed - I added a sentence for that
DroidIn.net
So do I have to do an additional step to get it from trunk or release branch to executable code? How is this usually setup/done?
codeninja
Now I have a sentence for that too :)
DroidIn.net
Ant is a good choice if you had prior experience and it's good at copying files
DroidIn.net
+2  A: 

I keep development and production environments separate; that is, the server never uses a working copy.

Edit for clarification: By "sever never uses a working copy" I mean that the "svn checkout" is never executed on the server and thus there is no WC located on the server. Instead the "svn export" command can used to "pull a revision" without creating a WC.

However, sometimes it is easy to pull (a specific tested tag) onto a server. So, as a transport mechanism, SVN is sometimes handy.

pst
the server never uses a working copy of what?
codeninja
trunk is you working copy. Don't use it directly from SVN
DroidIn.net
A/the WC is actual a/the *local* directory structure which is "linked" to a SVN repository. Y'know, the directories that contain .svn meta-info directories.
pst