Using Siebel Tools > Customizing Your Tools Environment > Process for Integrating With Third-Party Source Control >

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. You need to modify the batch file to reflect your current development environment and then distribute to all developers at your site.

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 described in Table 20

Table 20.  Arguments for the srcctrl.bat File
Argument
Description

action

Check in or check out.

dir

Path name 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%

The variables used in the srcctrl.bat batch file are described in Table 21.

Table 21.  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.

NOTE:  The folder that SIF files are written to is specified by the TempDir parameter in the [Siebel] section of the tools.cfg file. By default it is set to the \Siebel\tools\7.7\temp folder of your Tools installation folder. change this parameter to write the PROJECT directory to another location.

The following MS-DOS limitations exist in Windows 95 and 98:

  • The default command-line character limitation is 127 characters. You can increase the global command-line character limit to its maximum by placing the following line in config.sys:

    shell=c:\windows\command.com /u:255

  • The default environment space limitation is 256 bytes. You can increase it by placing the following line in config.sys:

    shell=c:\command.com /p /e:2048

    or by placing the following line in the [NonWindowsApp] section in the system.ini file:

    CommandEnvSize=2048

    2048 is the size of the new environment space, so you might specify a different value here.

Using Siebel Tools