Thursday, January 29, 2009

Subversion (version control system)

  1. On both server and client, install Subversion:
    sudo apt-get install subversion
  2. On the server (setting up Subversion to be accessed via SSH):
    1. Make a directory for the repositories to sit:
      mkdir $SVN_DIR 
      Typically, use /home/$USER/svn as $SVN_DIR.
    2. Create a repository:
      svnadmin create $SVN_DIR/$PROJECT 
      where $PROJECT is your project name
    3. Turn off anonymous access:
      nano $SVN_DIR/$PROJECT/conf/svnserve.conf
      Add the following lines:
      [general]  #section heading
      anon-access = none # turn off anonymous access
    4. (optional) Import existing content to the repository:
      svn import /path/to/original/content/ file://$SVN_DIR/$PROJECT[/deeper]
  3. On the client:
    1. Initial checkout:
      svn checkout svn+ssh://$SVN_SERVER/$SVN_DIR/$PROJECT[/deeper/]
    2. Subsequent updates, commits, etc.:
      svn update/commit/add/remove/rename/revert [filenames]

No comments: