Posts Tagged ‘svn’

How to backup svn repository using svnsync and VisualSVN Server on Windows

January 2, 2011 2 comments

This guide is for windows (Tested on Windows 7)
Nice guide for linux / unix is available at


  1. Instal VisualSVN Server
    this will also install svn and svnsync command line tools
  2. Create empty repository using VisualSVN Server managment console
    1. righ click on the Repositories
    2. Click Create new repository
    3. Enter repository name (do not check create Create default structure)
  3. Create svn user
    1. Righ click on the users
    2. Click Create users …
    3. Enter username and password
  4. Set permissions
    1. Righ click on repository
    2. Click properties
    3. Set read / write permissions for user
  5. Create empty hook
    1. Righ click on repository
    2. Click properties
    3. Open tab Hooks
    4. Click pre-revision property change hook
    5. Click edit
    6. Insert couple of blank lines
    7. pre-revision property change should be in bold text
    8. Click OK
  6. Initialize repository for svnsync
    1. Open command line (start>run>cmd)
      cd to the VisualSVNServer directory, for example:
    2. In this directory there should be svn.exe, svnsync.exe and similar binaries
    3. run following command:
      svnsync init https://MACHINENAME:8443/svn/project/

      if needed, you will be asked for username / password

  7. Synchronize
    1. run following command:
      svnsync sync https://MACHINENAME:8443/svn/project/
    2. wait for synchronization to complete 🙂

Generating SVN statistics using statSVN

October 17, 2010 Leave a comment

Today I generated svn statistics for a project I am working on for a last year and half. It’s very insightful Smile

Here is a short guide on how to it using windows machine

  1. You should install java from
  2. Download statsvn from I used version 0.7
  3. Download CollabNet Subversion Command-Line Client from and install it
  4. Do svn checkout
    C:\project>svn checkout
  5. Generate svn log
    C:\project>svn log ––xml -v > svn.log
  6. Generate statistics
    C:\project>java -jar statsvn.jar Project\svn.log Project
  7. Wait Smile
    (my project has about 1 000 000 lines of code… I waited for a few hours)
  8. Open generated index.html and enjoy Winking smile