Siebel Tools Reference > Repositories > Integrating with External Source Code Control Software >

Configuring the srcctrl.bat File


The srcctrl.bat batch file contains the sequence of commands to be executed in order to check the archived projects in to the source control system. The name of the archive file for the project to be checked in is specified as an argument to the batch file, in addition to other arguments. The syntax for the command line that executes the batch file is as follows:

SRCCTRL action dir comment_file project_file

The arguments for srcctrl.bat are shown in Table 74.

Table 74. Arguments for the srcctrl.bat File
Argument
Description
action
Check in or check out.
dir
Pathname of the directory on your local file system where the items are located.
comment_file
Contains the comment text to be provided to the source control software with the project file.
project_file
Name of the archive file for one project, enclosed in double quotes.

Srcctrl.bat executes once for each project, following the completion of repository check-in. It checks the archive file for the project into or out of the source control system. Srcctrl.bat is executed from a command line that is internally generated from the Siebel application software. You do not have access to the command line setup, and you cannot modify the parameter list.

The following batch file program code is taken from the standard srcctrl.bat file provided with Siebel applications, and is designed to work with Microsoft Visual SourceSafe. Comment lines have been removed. You need to customize the program code in this batch file, particularly if you are running source control software other than Microsoft Visual SourceSafe, or if the path is incorrect.

set PATH=C:\Program Files\DevStudio\Vss\win32\;%PATH%

set SOFTWARE=ss

set CHECKIN=%SOFTWARE% checkin

set CHECKOUT=%SOFTWARE% checkout

set ADD=%SOFTWARE% add

set SETPROJ=%SOFTWARE% cp

set PROJECT=$/PROJPOOL

set SRC_USR=

set SRC_PSWD=

set OPTIONS=-i-y -y%SRC_USR%,%SRC_PSWD%

set COMMENT=-c@

set NON_COMMENT=-c-

set FILE=

set LOGFILE=C:\Temp\xml.log

echo =======================srcctrl.bat========================== >> %LOGFILE%

set ACTION=%1

shift

set DIR=%1

shift

set COMMENT=%COMMENT%%1

shift

set FILE=%1

echo Change local directory to %DIR% >> %LOGFILE%

chdir %DIR% >> %LOGFILE% 2>&1

echo Set %PROJECT% as the working folder at Source Control System >> %LOGFILE%

%SETPROJ% %PROJECT% >> %LOGFILE% 2>&1

if errorlevel 100 goto END

if %ACTION%==checkout goto CHECK_OUT

if %ACTION%==checkin goto CHECK_IN

:CHECK_OUT

echo ============Check out file %FILE% from Source Control System============

if not exist %FILE% echo "New File" >> %FILE%

attrib +r %FILE%

echo Add %FILE% in case it doesn't exist in Source Control System >> %LOGFILE%

%ADD% %FILE% %NON_COMMENT% %OPTIONS% >> %LOGFILE% 2>&1

echo Start checking out %FILE% from Source Control System >> %LOGFILE%

%CHECKOUT% %FILE% %NON_COMMENT% %OPTIONS% >> %LOGFILE% 2>&1

goto END

:CHECK_IN

echo ============Check in file %FILE% into Source Control System============

echo Check in %FILE% into Source Control System >> %LOGFILE%

%CHECKIN% %FILE% %COMMENT% %OPTIONS% >> %LOGFILE% 2>&1

attrib -r %FILE%

goto END

:END

echo ===================End Of srcctrl.bat====================== >> %LOGFILE%

Table 75 explains the variables used in the srcctrl.bat batch file.

Table 75. Variables in srcctrl.bat
Variable
Description
PATH
Identifies the directory where the source code control software is installed. Modify this setting to reflect its actual location on your machine.
SOFTWARE
Source control system's command line utility. The command line utility for Microsoft Visual SourceSafe is "ss".
CHECKIN
Command at the start of the command line that calls for check-in into the source control system.
CHECKOUT
Command at the start of the command line that calls for check-out from the source control system.
ADD
Command at the start of the command line that calls for adding files in the source control system.
SETPROJ
Command at the start of the command line that calls for setting the working folder in the source control system.
PROJECT
Project (working folder) in the source control system where the items will be checked in/checked out.
COMMENT
Command-line Comments clause for each of the files being checked in or out. This is generated from the Comment argument to the batch file.
OPTIONS
Text of the Options clause to include in a command line.
SRC_USR
User logon name to include in the Options clause. This is a source control software user name, not the user name for a Siebel application.
SRC_PSWD
User password to include in the Options clause. This is a source control software password.
FILE
Filename of the archive file, obtained from the argument list of the batch file. This file needs to be checked in or out.
LOGFILE
Path and filename of the log file that will be generated.

You need to:

These MS-DOS limitations exist in Windows 95 and 98:


 Siebel Tools Reference, Version 7.5, Rev. A 
 Published: 18 April 2003