Procedure Editor
Source Code Management
Toad supports the Source Code Control (SCC), a Microsoft API. It defines a standard interface between development environments and source control products. The SCC API provides functions to perform the common source control operations such as Check-out, Check-in, and Add File.
Toad’s legacy source control feature provides check in and check out of files through the SCC API. This source control is only available in the Procedure Editor and the Project Manager, and it is not aware of database objects. Products tested with this feature include:
• Microsoft Visual SourceSafe 6.0
• PVCS VM 6.7
• Quma QVCS 3.5 and 3.6 (only allows one control group)
• ComponentSoftware CS-RCS 2.5.140, 3.0.192, 3.0.196
• Rational ClearCase 4.1
• Borland StarTeam 5.4 (requires the SCC Integration component from
Borland)
Earlier versions of these software products have not been tested with Toad, and we cannot guarantee their compatibility. Other vendors might conform to the API but have not been tested with Toad; therefore, integration cannot be guaranteed at this time.
Each SCC compliant product will create an entry in the registry identifying it as an SCC provider and identifying the location of the DLL used to invoke the SCC functions.
The client portion of the Source Control install must be run. You cannot run only the server piece of the Source Control install.
147
Toad for Oracle
Working Folder
You must have a working folder set in order to use the Toad Source Control interface. For example if you are using Microsoft Visual SourceSafe, to set your working folder you would open Microsoft Visual SourceSafe, right-click on a folder, and select the Set Working Folder option.
Source Control Options
You must also have the interface to the SCC configured by selecting the Source
Control options in the View | Options | Source Control page.
To set the Source Control Options
1.
Select the Source Control Provider that you wish to use with Toad from the dropdown. The Source Control Provider dropdown lists the
SCC providers found in the registry. If you switch providers, you should restart Toad.
2.
The Prompt for Comment check boxes let you determine whether or not a dialog will display that lets you store comments with the respective action.
Source Control is run through the Procedure Editor. The toolbar on the Procedure
Editor contains the check-in and check-out buttons.
All the other functions are on the right-click menu. The right-click menu contains a Source Control menu item that has the following submenu items:
Check-out File
When a file is checked-out, the file is reloaded from disk (it could be different than the file that was loaded), and it is made writeable.
Check-in File
When a file is checked-in, it is set to read-only again.
Undo-checkout
This command throws away any changes and reverts to the read-only, original version. This is useful, for example, if you do not want any changes stored to the database.
Get latest version
This refreshes the file from the source control and reloads the file (still read-only).
148
Procedure Editor
Add File
This adds the current file to source control and reloads it read-only.
Select project
This produces a dialog (provider-specific) to let you select a source control project to work with. The selected project is retained in the .ini file between Toad sessions.
A file that is not checked out should have a read-only status. Read-only files cannot be edited. All the SCC functions act upon the currently loaded file.
Source Control functionality does not work with database objects; it only works with files.
Steps for using Source Control from Toad for the first time
1.
Install your client.
2.
Confirm your client is configured to support SCC API. You confirm this by confirming that the client or the client install has created this registry key.
3.
Go to View | Options | Source Control.
4.
Select your SCC provider and check/uncheck options as desired.
5.
Load the file that you want to work with into the Procedure Editor.
Remember, Source Control is run through the Procedure Editor.
6.
Right-click in the Procedure Editor and choose Source Control |
Select Project.
7.
Your SCC provider will display a dialog that will ask you to select a project. Depending on the provider and the configuration, it might also ask you to log in or browse for a database. It might provide a place for you to set a working folder. Refer to your provider's documentation if you need further details.
The working directory for the selected project must match the directory that you loaded the file from.
8.
If the file is already stored in Source Control, you can check it in or check it out. Otherwise, you can right-click and select Source
Control | Add File to add it into Source Control. This assigns it a checked in status, and you will have to check it out to modify it
149