Page 1 of 1

Pushing SVN repos files to production

Posted: Mon Oct 09, 2006 11:43 am
by RobertGonzalez
This is actually a two part question. Please pardon my ignorance in advance.

After reading the SVN book and visiting the SVN Forums, I have a couple of questions that I know the good people of this community can answer for me. First, when checking out files from a repo, the entire repo structure seems to be copied to my computer into the folder that I have selected as my local SVN folder. That being said, to test files locally that I develop locally, should I be checking them out to my SVN folder, then copying them to my local server, then back after testing, or can I make a local server folder a SVN local repo copy? Particularly this question goes to the structure of the repo, in that when I set up local projects, I typically make them http://localhost/projectname/ but if the SVN repo structure is copied to the local server then it would become something like http://localhost/projectname/trunk/ which is something that I am not fond of.

The second question goes to pushing files into production after evaulation. If there are files that are in a repo and they have been approved for production use, how do I get them from the repo to the production server? Do I simply shell in to the server and CLI cp them? Or do I check them back out and then FTP them? I am really not sure what to do here.

I apologize in advance for my lack of understanding of Subversion. I suppose I should have learned all this earlier, but I have to learn it now, so now I ask. Thanks in advance for any help.

Posted: Mon Oct 09, 2006 12:09 pm
by klarinetking
Hi,

Don't really know for your first question, but for the second, you can Export a copy (which removes all the .svn hidden folders), and copy them manually, or write a script to automate that.

Hope this helps

klarinetking

Posted: Mon Oct 09, 2006 12:20 pm
by infolock
Either way works. Just according to what ya want to do. We check ours out in our local directory on the server in which the subversion repository server lives (ie: http://localhost:8080/svn/some_proj/trunk some_proj)

Then, in the root of the directory for the project, we just have a MakeFile that, when called "make live", it just copies the files over to the folders on the network where they belong.


Same thing can be done on your loca computer as long as you have installed subversion, have a legit account to connect to the subversion server, and have sufficient rights to the folder where the live files will be made.


Hope this helps.

Posted: Mon Oct 09, 2006 12:34 pm
by RobertGonzalez
Thanks guys. The answers are much appreciated.

Posted: Mon Oct 09, 2006 6:09 pm
by Maugrim_The_Reaper
Not sure I understood the entire question but...

You can have multiple local working copies almost anywhere - just sync them before use. Save you time from copying local copies everywhere. You shouldn't really need to have to copy working copies.
I typically make them http://localhost/projectname/ but if the SVN repo structure is copied to the local server then it would become something like http://localhost/projectname/trunk/ which is something that I am not fond of.
What is the svn command you run? It sounds like your repo path is pointing to /trunk. I think you can add the extra forward slash to skip having a trunk directory created. Don't quote me on that though ;)>

Posted: Mon Oct 09, 2006 6:42 pm
by RobertGonzalez
What I am doing is hitting the repository with TortoiseSVN and doing a checkout. When I do that the entire repo folder structure is copied to my local working folder (/branches, /tags, and /trunk).

Posted: Mon Oct 09, 2006 6:56 pm
by feyd
On my last project, we wrote a commit trigger that pushed it to the beta server automatically.

Posted: Mon Oct 09, 2006 7:05 pm
by RobertGonzalez
Was it a timed trigger? Or what was the trigger criteria? I am really starting to like SVN, but I feel like such complete n00b idiot using it right now.

Posted: Mon Oct 09, 2006 7:28 pm
by klarinetking
You can set up triggers to act upon every commit. For example, SF.net has several, which can be used to send commit diff e-mails, update that cia.navi.cx site, etc.

klarinetking