: HOWTOWebSVN

Welcome :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2008-07-03 17:10:21 by AdamBowen

Additions:
$ svn co http://websvn.tigris.org/svn/websvn/trunk www/websvn --username guest

Deletions:
$ svn co http://wedsvn.tigris.org/svn/websvn/trunk www/websvn --username guest



Edited on 2006-04-07 13:35:16 by WaylanL [minor formating edit]

Additions:
Note: If you are not using trunk, you may need to drop the "file://" above (which leaves you with "/home/<username>/svn"). The "file://" proctol appears to be a new feaure only in trunk.

Deletions:
Note: If you are not using trunk, you may need to drop the "file://" above (which leaves you with "/home/<username>/svn"). The file: proctol appears to be a new feaure only in trunk.



Edited on 2006-04-07 13:32:53 by WaylanL [updated sample url and added note on file://]

Additions:
Note: If you are not using trunk, you may need to drop the "file://" above (which leaves you with "/home/<username>/svn"). The file: proctol appears to be a new feaure only in trunk.
You can see my slightly modified (and currently empty) repo here. Both the config.inc file and install.txt file included with the package have very good documentation on the options available to you.


Deletions:
You can see my slightly modified (and currently empty) repo here. Both the config.inc file and install.txt file included with the package have very good documentation on the options available to you.



Oldest known version of this page was edited on 2006-04-03 14:48:45 by TimDorr []
Page view:
I wanted to set up a Subversion repository and allow public browsing. As dicussed elsewhere, Trac has too many dependencies (including mod_python or fcgi, which can be a pain) and WebDAV is out of the question for the shared accounts, so I needed an alternative.

With a little searching, I found WebSVN which offered a few different, yet clean interfaces and a nice set of options. Here's how I set everything up:

First we create a svn repository. We want to specify the FSFS type because the Berkley DB causes to many permission issues when apache runs as a different user than you.

    $ cd ~/
    $ mkdir svn
    $ svnadmin create --fs-type fsfs svn


Now, we want to lay out our repo into a nice format. We could create a seperate repo for each project, which WebSVN supports, but in a small shared hosting account we want to keep the used disk space to a minimum. Therefore a single, carefully layed out repo should serve just fine. The Subversion Book has some nice suggestions for this sort of thing. Here's how I did it. First I created a temporary directory and then imported it like so (Be sure to replace <username> with your ASO username):

    $ mkdir tmpdir
    $ cd tmpdir
    $ mkdir ProjectA
    $ mkdir ProjectA/trunk
    $ mkdir ProjectA/branches
    $ mkdir ProjectA/tags
    $ mkdir ProjectB
    $ mkdir ProjectB/trunk
    $ mkdir ProjectB/branches
    $ mkdir ProjectB/tags
    $ svn import . file:///home/<username>/svn -m 'Inital repository layout'
    Adding     ProjectB
    Adding     ProjectB/trunk
    Adding     ProjectB/branches
    Adding     ProjectB/tags
    Adding     ProjectA
    Adding     ProjectA/trunk
    Adding     ProjectA/branches
    Adding     ProjectA/tags
   
    Committed revision 1.


Now, let's make sure it worked. Then delete the temp dir:

    $ svnlook tree /home/<username>/svn
    /
     ProjectB/
      trunk/
      branches/
      tags/
     ProjectA/
      trunk/
      branches/
      tags/
    $ cd ../
    $ rm -r tmpdir


Now we want to install WebSVN. Get it via svn You may not want to use truck as I did here - use a stable tag as suggested by the devs. Note that you must use the username and password (both 'guest').

$ svn co http://wedsvn.tigris.org/svn/websvn/trunk www/websvn --username guest
Authentication realm: <http://wedsvn.tigris.org:80> CollabNet SCM Repository
Password for 'guest': guest
A  www/websvn/licence.txt
...
U www/websvn
Checked out revision 445.


Finally, we point WebSVN at our repo and alter any other settings we want:

$ cd www/websvn
$ cp include/distconfig.inc include/config.inc
$ vim include/config.inc

// Uncomment and edit this line:
$config->addRepository("My Projects", "file:///home/<username>/svn");


That should do it. Don't forget to replace <username> with your ASO username.

You can see my slightly modified (and currently empty) repo here. Both the config.inc file and install.txt file included with the package have very good documentation on the options available to you.
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1632 seconds