Helpful SVN scripts

Helpful SVN scripts

In every project we do before we release the projects its quite important to create a snapshot for each service/subproject.

In SVN terms we call this a tag.

One can use any SVN clients available in the market like Tortoise, sliksvn etc.and create this tag but when we are dealing with a large set of services it could be bit time consuming and error prone before you get it right.

I created this small script which takes in parameters like username password and tag version as input and reads the list of projects on which u want to version from another file projectlist.txt (this should exist in the same directory or provide full path) and creates the tag version in the corresponding tags directory .

Also this assumes that the directory structure is the standard SVN structure i.e.

@echo off
setLocal EnableDelayedExpansion


for /f “tokens=* delims= ” %%i in (projectlist.txt) do (

    REM Tag the project
    svn copy -m “Tagging the %Version% release of the project to go for Preprod”
    REM Export the project
    svn export –non-interactive –username %USERNAME% –password %PASSWORD% .\%%i
    REM Append to the project list
    REM Clean up exported directories
    REM rmdir /S /Q %%i\SCA-INF 2> nul
    rmdir /S /Q %%i\deploy 2> nul
    rmdir /S /Q %%i\.designer 2> nul
    rmdir /S /Q %%i\thumbnail 2> nul




Post Tagged with , , , ,

2 Responses so far.

  1. Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.

  2. Top Travel Destinations says:

    An excellent post, providing something good to read,it’s just good to came across the post on hand sets and its features.