Archive

Posts Tagged ‘subversion’

Apache + SVN on Fedora

November 6, 2010 1 comment

Create SVN repo, accessible from network, all users can read & checkout, certain users can write / commit

Software: Apache 2.2.11, Subversion 1.6.6, mod_dav_svn 1.6.6

File & folder:

/var/svn/
/var/svn/auth – authentication file
/var/svn/repos/ – project repositories

Install mod_dav_svn

yum install mod_dav_svn svn

Create SVN repo (refer previous post)

svnadmin create --fs-type fsfs /var/svn/repos/testproj

Create authentication file

htdigest [-c] <auth file> <realm> <username>
htdigest -c /var/svn/auth "Project Repository" user1

c – create file (exclude this flag when adding users)

Setup Apache + mod_dav_svn

vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn>
  DAV svn
  SVNParentPath /var/svn/repos
  SVNListParentPath On
  AuthType Digest
  AuthName "Project Repository"
  AuthUserFile /var/svn/auth
  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
  </LimitExcept>
</Location>

Change ownership of the whole svn repo dir

chown -R apache.apache /var/svn

Note: Re-assign the ownership everytime you create a new repo

Lastly, reload apache

service httpd reload

View list of projects – http://localhost/svn
View contents of particular (myproj) project – http://localhost/svn/myproj

Categories: Notes Tags: , , ,

Subversion on thumbdrive

March 26, 2010 Leave a comment

This post shows how to create a Subversion (SVN) repo on a thumbdrive. I don’t know what’s the minimum capacity of thumbdrive should be used, but 2GB seems enough (mine’s 8GB)

Software to use: RabbitVCS

There are 3 parts, download all parts (Core, Nautilus & GEdit plugin), and install them

  • Select all 3 packages, right click > Open with Package Installer

Assumptions:

  • the repo folder on thumbdrive is referred as /media/thumbdrive/project_repo
  • project folder is ~/project/my_project (folder contains your work)

Create new repository:

  1. Create a folder (for repo) on thumbdrive (/media/thumbdrive/project_repo)
  2. Go inside that folder, right click > RabbitVCS > Create repository here
  3. Create temporary folder (~/tmp) and create repo layout inside:
    • ~/tmp/trunk
    • ~/tmp/branches
    • ~/tmp/tags
  4. Import repo layout into repo inside the thumbdrive:
    • Select ~/tmp > right click > RabbitVCS > Import
    • Repository: file:///media/thumbdrive/project_repo
    • enter import message, and OK
  5. Import project folder into repo inside the thumbdrive:
    • Select ~/project/my_project, right click > RabbitVCS > Import
    • Repository: file:///media/thumbdrive/project_repo/trunk
    • enter message, and OK

Check out repo into another computer

Assuming this another computer running Windows, it should have TortoiseSVN installed.
Note: c:\users\username is referred as ~\ in this post, repo folder in thumbdrive is e:\project_repo

  1. Go to project folder (folder which your keep all your project files, e.g. ~\projects)
  2. Right click > SVN Checkout
  3. URL of repository: file:///E:/project_repo/trunk
  4. Checkout directory – make sure it is ~\projects, then OK
Categories: Notes Tags: , , ,
Follow

Get every new post delivered to your Inbox.