This is a mirror of official site: http://jasper-net.blogspot.com/

Automating Merges w/ TortoiseSVN

| Sunday, May 16, 2010
Our team works off the feature branch concept and because of this the various teams need to do a source-to-branch merge on a consistent interval.  Doing this process is not difficult, but it is reparative and could become error prone if you are not paying attention.  Because of this we have created a simple .bat script which will aid in automating most of the repetitive tasks which should reduce the amount of errors we encounter.

The script (this is v1 of the script so there may be improvements we could make) is as follows:

CLS
ECHO OFF

REM -- These values may need to change, but not all that often
SET TortoiseSvnLocation="C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe"

REM -- Make sure to change these values
SET /p TrunkHead=Please Enter the latest revision for the Trunk (should be HEAD):
SET /p BranchHead=Please Enter the latest revision for the Branch (should be HEAD):
SET /p TrunkStartRevision=Please Enter the Start Revision:
SET /p TrunkEndRevision=Please Enter the End Revision:

REM -- Make sure you have the physical locations correct
SET TrunkLocationOnDisk="C:\Source\Trunk"
SET BranchLocationOnDisk="C:\Source\\Branch"

REM -- Make sure you have the Url's pointing to the correct location on disk
SET TrunkUrl=https://URL_TO_ROOT_SOURCE
SET BranchUrl=https:/URL_TO_BRANCH_SOURCE

ECHO Chaning To Trunk Location
CD %TrunkLocationOnDisk%

ECHO /* About to update the trunk to the %TrunkHead% */
%TortoiseSvnLocation% /command:update /rev:%TrunkHead% /path:%TrunkLocationOnDisk% /closeonend:1

Read more: Derik Whittaker

Posted via email from jasper22's posterous

0 comments: