Archive

Posts Tagged ‘svnadmin’

SVN : Preparing for branching/ Merging process

February 3, 2011 5 comments

Preparing your repository for branching and merging can turn into a headache when you do it for the first time. This is a small .. may be obvious .. note to everybody who can get some help

My setup

  • SVN Server hosted on linux
  • Tortoise SVN as client being used from windows

If you perform following checks before getting into the process of branching and merging, you are going to save a lot of time and efforts trying to figure out errors messages and causes

  1. Make sure your SVN Server version is above 1.5. If not, UPGRADE. In my case it was 1.4.2 and I upgraded it to 1.6.* from Collabnet
  2. Make sure your SVN Repository version is upgraded. You can find that out by using following commands
    cd /path/to/repo/reponame
    cd db
    cat format
    

    i.e. changing to repo/directory/db and looking at contents of format file. For 1.4.*, format file showed 2, which should be 4 for it to be a 1.6.* repository. I had to upgrade the repository version by using
    svnadmin upgrade path/to/repo/reponame
    
  3. Make sure your SVN Client is equipped to handle features offered by the upgraded SVN Server. I just downloaded version of tortoise svn made for 1.6 version

After these checks, you can choose the model you want to opt for your process and get started.

In my case, I chose mainline development happening in trunk, creating branches after each phase release. Every-time a bug is fixed in a branch, its committed to its corresponding branch. Then from trunk, using TortoiseSVN’s “reintegrate a branch” option, I choose repository URL of branch and follow through steps to finish the merge. It works wonders !

Related posts

Categories: Linux, SVN

SVN : Utility commands

February 3, 2011 4 comments

List of SVN utility commands that I needed to use frequently apart from commit and update. Feel free to add to the list

  • Know SVN binary path
    which svn
    
  • Know SVN server version installed
    svnadmin --version
    
  • Know SVN Client server version installed
    svn --version
    
  • Create SVN Respository
    svnadmin create path/to/repository/reponame
    

    You can then assign permissions to reponame directory like you do on any other directory
  • Upgrade SVN Respository version
    svnadmin upgrade path/to/repository
    

Related posts

Categories: Linux, SVN

linux: create svn repository

December 26, 2008 17 comments

Assumptions:
You already have SVN installed on your linux server. If you do not know if it is installed, just type command

which svn

If this returns a valid path as output, then it means that svn is installed on your linux box. If not, you need to install it. Installing subversion is very easy (for most distributions) and ample documentation is available on the web. You can start with http://subversion.apache.org/.

Four steps to complete svn repository creation on linux

  1. log onto server as root
  2. I prefer to have all svn repositories in one directory for better organization and easy maintenance. So next step for me would be to change to my svn directory.
    cd /svnRepos

    If you do not already have a directory for svn repositories, I would recommend creating one.

    mkdir svnRepos
  3. Create repository using following command
  4. svnadmin create /path/to/repo/RepoName

    where : RepoName is the name of repository to be created. As an example, I want to create a repository for my testproject. I would write

    svnadmin create testproject
  5. Change group ownership of repository for the intended group. In this case, consider I have a user group created as “all” and I want this group to have ownership to this repository.
    chown -R :all /path/to/repo/RepoName
  6. Grant Read/Write/Execute permissions to “all” on this repository
    chmod -R 770 /path/to/repo/RepoName

After this, all you need to do is

  • Install a client like tortoiseSVN on the user’s machine
  • SVN Checkout the repository. I would use a URL like following to connect to my newly created repository
    svn+ssh://username@servername/path/to/repo/RepoName

    Where

    • username: one of the users from group all
    • servername: my linux server which hosts SVN

    For my testproject, the path looks like

    svn+ssh://jyotsnas@servername/svnRepos/testproject

Related posts

Categories: SVN
Follow

Get every new post delivered to your Inbox.