[dba-VB] Subversion, TortoiseSVN and VisualSVN

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Fri Apr 25 15:38:38 CDT 2008


Hi John,

Below is the set of .batch files I have just found, which I did make last
autumn to control/direct subversion server. I must say I'm not sure this is
the last working version I used (AFAIKR I did write some simple custom code
in .NET to control subversion server to avoid using .bat files, which have
to be made for every project you'll use - and my simple custom code was
parameterized to use any source project) but as you can see the set of batch
files below is the minimal set to fulfill all the source control main tasks.
Watch line wraps and read subversion docs for more details - svn-book.pdf -
located in Sunversion server's installation folder (I'm out until Sunday).
Thanks.

--
Shamil

P.S. .bat files to use with Subversion

!svn_admin_main.bat
=====================
rem Port: 3690
rem RepositoryPath: e:\Subversion\svn_repository
rem X Install svnserve to run as a Windows service
rem ProgramSetupPath: D:\Program Files\CollabNet Subversion Server

call make_dirs.bat new_repository
call check_out.bat new_repository
pause

make_dirs.bat
==============
rmdir tmpdir /s /q
mkdir tmpdir
mkdir tmpdir\projectA
mkdir tmpdir\projectA\trunk
mkdir tmpdir\projectA\branches
mkdir tmpdir\projectA\tags
mkdir tmpdir\projectB
mkdir tmpdir\projectB\trunk
mkdir tmpdir\projectB\branches
mkdir tmpdir\projectB\tags
mkdir tmpdir\projectC
mkdir tmpdir\projectC\trunk
mkdir tmpdir\projectC\branches
mkdir tmpdir\projectC\tags
rem
xcopy e:\temp\SV\SRC\ProjectA\*.* tmpdir\projectA\trunk /Y /E
xcopy e:\temp\SV\SRC\ProjectB\*.* tmpdir\projectB\trunk /Y /E
xcopy e:\temp\SV\SRC\ProjectC\*.* tmpdir\projectC\trunk /Y /E
rem
rmdir /s /q ..\%1
call create_fs_repository.bat %1
rem
svn import tmpdir file:///e:/Subversion/%1 --message svnlog.log
call verify_fs_repository.bat  %1
call svnlook_fs_repository.bat %1
rmdir tmpdir /s /q
rem 
rem svn import file:///e:/temp/sv/projecta file:///e:/Subversion/%1/projectA
--message svnlog.log

create_fs_repository.bat
========================
svnadmin create ../%1 --config-dir ../args/conf --fs-type fsfs
xcopy ..\args\conf\*.* ..\%1\conf /Y /E
goto :EOF

verify_fs_repository.bat
========================
svnadmin verify ../%1
GOTO :EOF

svnlook_fs_repository.bat
=========================
svnlook info ../%1
goto :EOF


check_out.bat
=============
rem rmdir  E:\Temp\SV\WORKING_SET\ /Q /S
mkdir  E:\Temp\SV\WORKING_SET\ /Q /S
svn checkout file:///E:/Subversion/%1/projectA/trunk
E:\Temp\SV\WORKING_SET\ProjectA --message checkout.log
svn checkout file:///E:/Subversion/%1/projectB/trunk
E:\Temp\SV\WORKING_SET\ProjectB --message checkout.log
svn checkout file:///E:/Subversion/%1/projectC/trunk
E:\Temp\SV\WORKING_SET\ProjectC --message checkout.log

commit.bat
==========
svn commit E:\Temp\SV\WORKING_SET\ProjectA --message commit.log
svn commit E:\Temp\SV\WORKING_SET\ProjectB --message commit.log
svn commit E:\Temp\SV\WORKING_SET\ProjectC --message commit.log

backup_fs_repository.bat
========================
svnadmin hotcopy ../%1 ../backups/%1
GOTO :EOF





More information about the dba-VB mailing list