Waheem Rahman

April 30, 2008

Siebel Version Control – Source Code Integration using Sub Version

Filed under: Siebel — arwaheem @ 11:06 am

Here is the batch file to integrate Siebel Version Control with Subversion. This supports both Object level and Project level checkin/checkout.

Only drawback is comments inserted can be max of 9 words, to avoid exceeding this use ‘_’ between words

Steps:

1.   Install the Subversion Command line Client

2.   Login in to Siebel tools. Navigate to View–>Options–>Checkin/Checkout

3.   Check the Enable source control integration and Show execution of the integration batch file

4.   Provide the path of the batch file

Batch File:

@echo off
set PATH=C:\Subversion\bin;%PATH%
set ssdir= <<URL or location of the svn repository>>
set LOGFILE=C:\xml.log
set username=<Enter your Username>
set password=<Enter your Password>
set ITEMS=
echo =======================srcctrl.bat========================== >> %LOGFILE%
set ACTION=%1
shift
set DIR=%1
shift
set COMMENT=%1
echo Change local directory to %DIR% >> %LOGFILE%
chdir %DIR% >> %LOGFILE% 2>&1
shift
set ITEMS=%ITEMS%%1
setLocal EnableDelayedExpansion
set fname=”%ITEMS%”
echo fname – %fname% >> %LOGFILE%
for /f “usebackq tokens=1,2 delims=-” %%i in (‘%ITEMS%’) do set SiebObj1=%%i
echo SiebObj -%SiebObj1% >> %LOGFILE% 2>&1
if %SiebObj1%==Applet goto CONTINUE
if %SiebObj1%==Application goto CONTINUE
if %SiebObj1%==Assignment_Attribute goto CONTINUE
if %SiebObj1%==Assignment_Criteria goto CONTINUE
if %SiebObj1%==Bitmap_Category goto CONTINUE
if %SiebObj1%==Business_Component goto CONTINUE
if %SiebObj1%==Business_Object goto CONTINUE
if %SiebObj1%==Business_Service goto CONTINUE
if %SiebObj1%==Class goto CONTINUE
if %SiebObj1%==Command goto CONTINUE
if %SiebObj1%==Content_Object goto CONTINUE
if %SiebObj1%==Dock_Object goto CONTINUE
if %SiebObj1%==EIM_Interface_Table goto CONTINUE
if %SiebObj1%==Find goto CONTINUE
if %SiebObj1%==Help_Id goto CONTINUE
if %SiebObj1%==HTML_Hierarchy_Bitmap goto CONTINUE
if %SiebObj1%==Icon_Map goto CONTINUE
if %SiebObj1%==Import_Object goto CONTINUE
if %SiebObj1%==Integration_Object goto CONTINUE
if %SiebObj1%==Link goto CONTINUE
if %SiebObj1%==Menu goto CONTINUE
if %SiebObj1%==Message_Category goto CONTINUE
if %SiebObj1%==Pager_Object goto CONTINUE
if %SiebObj1%==Pick_List goto CONTINUE
if %SiebObj1%==Project goto CONTINUE
if %SiebObj1%==Report goto CONTINUE
if %SiebObj1%==Screen goto CONTINUE
if %SiebObj1%==Search_Category goto CONTINUE
if %SiebObj1%==Search_Engine goto CONTINUE
if %SiebObj1%==Search_Index goto CONTINUE
if %SiebObj1%==Symbolic_String goto CONTINUE
if %SiebObj1%==System_Activity_Object goto CONTINUE
if %SiebObj1%==Table goto CONTINUE
if %SiebObj1%==Toolbar goto CONTINUE
if %SiebObj1%==Type goto CONTINUE
if %SiebObj1%==View goto CONTINUE
if %SiebObj1%==Web_Page goto CONTINUE
if %SiebObj1%==Web_Template goto CONTINUE
if %SiebObj1%==Workflow_Policy_Column goto CONTINUE
if %SiebObj1%==Workflow_Policy_Object goto CONTINUE
if %SiebObj1%==Workflow_Policy_Program goto CONTINUE
if %SiebObj1%==Workflow_Process goto CONTINUE
set SiebObj1=Project
:CONTINUE
echo SiebObj1 – %SiebObj1% >> %LOGFILE%
echo Set %PROJECT% as the working folder at Source Control System >> %LOGFILE%
if errorlevel 100 goto END
echo Action : %ACTION% >> %LOGFILE% 2>&1
echo Action %ACTION% DIR %DIR% FIlE %fname% COMMENT %COMMENT% >> %LOGFILE% 2>&1
rem Reading the comment file
set varNUM=0
for /f “tokens=*” %%T in (comment_file) do call :varSET %%T
goto :eof
:VarSET
set /a varNUM=%varNUM%+1
set MYvar=%1 %2 %3 %4 %5 %6 %7 %8 %9
echo %MYvar% >> %LOGFILE% 2>&1
if %ACTION%==checkout goto CHECK_OUT >> %LOGFILE% 2>&1
if %ACTION%==checkin goto CHECK_IN >> %LOGFILE% 2>&1
:CHECK_OUT >> %LOGFILE% 2>&1
echo ============Check out file %FILE% from Source Control System============
chdir %DIR% >> %LOGFILE% 2>&1
svn checkout –username %username% –password %password% %ssdir%>> %LOGFILE% 2>&1
goto END >> %LOGFILE% 2>&1
:CHECK_IN >> %LOGFILE% 2>&1
echo ============Check in file %FILE% into Source Control System============ >> %LOGFILE% 2>&1
chdir %DIR%\sif\%SiebObj1% >> %LOGFILE% 2>&1
if exist %fname% goto FILE_EXIST >> %LOGFILE% 2>&1
echo ==========Inside File_Not_Exist=============== >> %LOGFILE% 2>&1
copy “%DIR%\%fname%” “%DIR%\sif\%SiebObj1%\%fname%”
svn add %fname% >> %LOGFILE% 2>&1
goto COMMIT >> %LOGFILE% 2>&1
:FILE_EXIST >> %LOGFILE% 2>&1
echo ==========Inside File_Exist=============== >> %LOGFILE% 2>&1
chdir “%DIR%\sif\%SiebObj1%”
copy “%DIR%\%fname%” “%DIR%\sif\%SiebObj1%\%fname%”
goto COMMIT >> %LOGFILE% 2>&1
:COMMIT
chdir “%DIR%\sif\%SiebObj1%”
svn commit -m “%MYvar%” –username %username% –password %password% >> %LOGFILE% 2>&1
goto END >> %LOGFILE% 2>&1
:END
echo ===================End Of srcctrl.bat====================== >> %LOGFILE%

Site Meter

About these ads

7 Comments »

  1. Hi Waheem,

    I would like to thank you for providing the batch file online. without it, it wouldnt have been possible to implement Svn for my client.

    Comment by tushar — August 3, 2009 @ 8:59 pm

    • Hi Waheem
      Does Subversion work with Siebel 8.1?

      Comment by Kiran — August 10, 2009 @ 7:54 pm

      • It should work for 8.1.

        Comment by arwaheem — August 11, 2009 @ 4:13 am

  2. Is there any different between SubVersion and TortoiseSVN?

    Comment by Ranjan — December 16, 2009 @ 5:48 am

    • Tortoise SVN is a tool that aloows you to connect to SVN repositories. It is more of a Windows explorer plug in.

      Comment by arwaheem — December 16, 2009 @ 2:16 pm

  3. Hi Waheem,
    Thanks for the batch file. Wanted to ask one question. I am confused with Tortoise SVN usage and collabnet client.
    What exactly do i need to install on Siebel developers machines?

    Do i need to install Tortoise SVN along with Subversion client?

    Comment by Sachin — December 9, 2010 @ 5:07 am

    • You need to install SVN collabnet client. Tortoise SVN is a windows explorer plug in.

      Comment by arwaheem — December 9, 2010 @ 8:54 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: