SVN without subdirectories

SVN without subdirectories

Posted by: BeckyRose
Posted on: 2008-08-21 13:01:00

Hello

I am trying to configure one of my dreamhost accounts so that I can update the web page entirely from within my development IDE (Eclipse).

When I create the SVN in the Dreamhost panel it appears to want to create the SVN in a sub-directory, and when I publish from within Eclipse it also insists on going in to a sub-directory.

I would like to be able to edit my web pages and publish all from within the IDE using the SVN, but to do this I need to publish to the root folder.

Additionally I have not found anywhere to change permissions on folders in the control panel, am I just blindly missing it? I need php to have write access to a particular folder and cannot see where I can do chmod.

Thank you very much for any help you can give me.

Re: SVN without subdirectories

Posted by: Lensman
Posted on: 2008-08-21 17:22:00

In reply to:

I would like to be able to edit my web pages and publish all from within the IDE using the SVN, but to do this I need to publish to the root folder.


Are you publishing your website from SVN using "svn export"?

Use the 3DOM50 promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!

Re: SVN without subdirectories

Posted by: pyr02k1
Posted on: 2008-08-21 17:51:00

http://wiki.dreamhost.com/Svn - thats the svn wiki for dreamhost. that should explain a little bit i hope.

as to the chmod issue. either webftp from the domains/manage domains page or ssh into your site and chmod it that way.

Re: SVN without subdirectories

Posted by: BeckyRose
Posted on: 2008-08-22 02:10:00

Thank you, I have the chmod stuff sorted I found that ( *blush - sometimes i'm daft* ).

With the SVN i've gone through the Wiki stuff, i've PuTTY'd into my DH account for the first time - seems pretty straightforward linuxy type stuff so that was ok, and i've followed the wiki article - but i'm confused by the last step and am sure i'm doing it wrong.

The last step says to modify my /home/username/svn/projectname/post-commit to invoke the CGI script.

I goto my folder and inside it appears empty, I see no filed. I tried creating a file called 'post-commit' but to no avail thus far.

I tried adding my main account/PuTTY account to my list of SVN users but I still dont see any files.

I'm competent but not expert or experienced in this field so any help given is really appreciated, thank you.

Re: SVN without subdirectories

Posted by: misterhaan
Posted on: 2008-08-22 08:30:00

you need to create a post-commit file and make sure it's executable. here's how i got mine to auto-update:

0. your site should already be on a working copy checked out from subversion
1. create a subdomain
2. create a file at the subdomain, named something like svnupdate.cgi. here are the contents:

#!/bin/sh
# disable filename globbing
set -f
echo Content-type: text/plain
echo
echo Updating live site
/usr/bin/svn update /home/username/example.com

3. you can test the cgi script by hitting http://subdomain.example.com/svnupdate.cgi
4. lock down the subdomain so only dreamhost servers can access it, with an .htaccess file like this:

order deny,allow
allow from .dreamhost.com
deny from all

5. create your post-commit file in svn/reponame/hooks/, and make it request your cgi script:

#!/bin/bash
REPOS="$1"
REV="$2"
wget -O - http://subdomain.example.com/svnupdate.cgi

6. change permissions on that script to 755 so it can execute.

hope that helps!

track7 - my dream-hosted site

Tags: root folderfoldersweb pagescontrol panelweb page