SVN Setup & Configuration...

Softwares used for SVN setup


Subversion is the new standard for version control and Software Configuration Management (SCM) for globally distributed organizations. CollabNet Subversion is an enterprise-ready distribution of Subversion that includes certified binaries, platform-specific installers, certified plugins for other tools, and enterprise-ready add-ons.
You can download subversion


TortoiseSVN is an excellent SVN client. It stores authentication details in an encrypted form which means it can be set to remember login details safely. If you would like to read up on the client, it comes with an inbuilt help system, or you can browse the vendor website at


Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java
You can download Python


Python bindings for SVN


Automation tool for repository backup and tagging

SVN Repository Information

Repository Access svn://
Repository location: E:\Repository
Primary backup D:\RepoBackup
Secondary backup:

SVN Repository Configuration

SVN admin is responsible for creating/configuring/maintaining the repository

User Configuration

Open the passwd file in the repository conf folder (e.g. E:\Repository\conf)
Add user and password
Use1 = password1
Use2 = password2
Use3 = password3

Repository Access Permission

Open the authz file in the repository conf folder (e.g. E:\Repository\conf)
Add the access permission details
admins = User1
developers = User2,User3
* = r
@admins = rw
@developers = rw

SVN Server Configuration

Open the svnserve.conf file in the repository conf folder (e.g. E:\Repository\conf)
Uncomment the following lines
auth-access = write
password-db = passwd
authz-db = authz
realm = Automation Project
Mailer Configuration
Mailer Configuration file is used by script to send mails on commit
smtp_hostname =
diff = C:\diff %(from)s %(to)s
commit_subject_prefix = [SVN Repository Commit]
propchange_subject_prefix =
lock_subject_prefix = [SVN Repository Lock]
unlock_subject_prefix = [SVN Repository unLock]
from_addr =
to_addr =
generate_diffs = add copy modify delete
show_nonmatching_paths = yes

Backup Configuration

Backup configuration file is used by backup.xml to backup the repository
Open the backup.conf file in the repository conf\adminscripts folder (e.g. E:\Repository\hooks\adminscripts)
Add the configuration details
#Tue Jun 16 16:42:30 GMT+05:30 2009
#Mail Details
mail.message=SVN Repository Backup Repository Backup Failed
mail.success.subject=SVN Repository Backup successfully completed
# SVN Details

Tag Configuration

Tag configuration file is used by createtag.xml to create repository tag
Open the createtag.conf file in the repository conf\adminscripts folder (e.g. E:\Repository\hooks\adminscripts)
Add the configuration details
#Mail Details
mail.message=SVN Repository tag Repository tag Failed
mail.success.subject=SVN Repository tag successfully completed
# SVN Details
repo.source.url = svn:// = svn://
repo.tag.message = Created Automated tag on

Schedule Task

There are 2 scheduled task one for daily repository backup at 3:00 am and the other for tagging the truck at 6:00 pm

Backup Activity files [e.g E:\Repository\hooks\adminscripts]
Backup.config : holds the configuration information
Backup.xml : ant script to take backup
backup_trigger.bat : batch file to trigger the ant script backup.xml which is added in the windows scheduler
Tagging Activity files [e.g E:\Repository\hooks\adminscripts]
createtag.config : holds the configuration information
createtag.xml: ant script to create tag
createtag_trigger.bat : batch file to trigger the ant script createtag.xml which is added in the windows scheduler

Hook Scripts
Following are the hook scripts used for repository [e.g E:\Repository\hooks]

Precommit [Pre-commit.bat]
Pre-commit.bat batch file is used to check empty comments and delete permission
@echo off
set REPOS=%1
set TXN=%2
set SVNLOOK=C:\svnserver\svnlook
REM to check for empty log
: Log msg part
for /f "tokens=*" %%a in ('%SVNLOOK% author --transaction %TXN% %REPOS%') do set USER=%%a
for /f "tokens=*" %%i in ('%SVNLOOK% log --transaction %TXN% %REPOS%') do set LOGMSG="%%i"
echo %USER% ! please enter a descriptive log message and then try to commit again 1>&2
exit 1
REM to check for delete access
: Delete part
for /f "tokens=1,2" %%b in ('%SVNLOOK% changed --transaction %TXN% %REPOS%') do (
if "%%b" == "D" (
REM command to find the user access rights
FIND /i "%USER%" E:\Repository\conf\svndelete
echo %USER%! you are not allowed to delete the files/folders from the i Repository 1>&2
echo please contact your administrators. 1>&2
exit 1

Postcommit [post-commit.bat]
post-commit.bat batch file is used to send mails after successful commit by the users

rem setup paths
SET HOOKS_DIR=E:\Repository\hooks
rem run script
"%PYTHON%" "%HOOKS_DIR%\" commit %REPOS% %REV% "E:\Repository\conf\mailer.conf"

Variable name should start with the type of variable
Ex. String variable should have str prefixed like “strName”.
Integer variables should have num prefixed like “numCount”.
Boolean variables should have bln prefixed like “blnStatus”

Best Practices

Know when to create branches
Inform the team on which branch the team members should work
Have a look at the emails from the SVN system
Make sure the branches are up-to-date
Tag\lock the branch if finalized for release
Do not deliver the release by copying the folders/files directly from repository
Export the folders and files from the repository and deliver
Maintain a separate area for backups and staging
Monitor the backups and staging area
Ensure team members enters a understandable comments
Monitor locks and checkouts


If you need any other Subversion related information, read the documentation on the Subversion website, or the Wikipedia entry.Alternatively, a good (though somewhat lengthy) exhaustive guide is "Version Control with Subversion". This document (sometimes called "The Red-Bean Subversion Book", owing to its origin at should get you started on the right track with good SVN practice and give you a good introduction to the concepts.

About the author

My name is Xavier Dilip Kumar Jayaraj having 16+ years of IT experience which includes solid experience and depth Knowledge in Application Life Cycle Management, Configuration Management, Implementation and Support using TFS on-premises and Azure DevOps. I have invested in gaining DevOps knowledege to expertise with Cloud Computing providers namely Microsoft Azure and Amazon Web Services in recent years. I am very positive to learn and adapt emerging technologies to client’s environment.

Microsoft Certified: Azure Administrator Associate

Microsoft Certified: Azure DevOps Engineer Expert

DevOps Engineer Certificate Program | Transcript 

OTP-AWSD5: AWS IoT: Developing and Deploying an Internet of Things

[PCEP-30-01] PCEP – Certified Entry-Level Python Programmer

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs



The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.