Through the Source Control feature, you can use WebFOCUS App Studio to manage files and add them to the Source Control system repository. Your Source Control provider must first be configured in the WebFOCUS Administration Console. For more information, see the TIBCO WebFOCUS® Security and Administration manual.
Within an WebFOCUS App Studio domain, you can add a published folder to Source Control. Within a designated folder, you can add individual files to Source Control.
Source Control is a feature that provides many benefits to developers, including the following:
The following are requirements and usage notes when using Source Control:
ReportCaster related files
Business Intelligence Portal related files
When you start WebFOCUS App Studio, it checks the WebFOCUS instance to determine if it is configured for Source Control.
If WebFOCUS is configured for Source Control and the WebFOCUS App Studio user provides Source Control credentials, WebFOCUS App Studio enables options to perform Source Control operations against the connected WebFOCUS environment.
Note: If you type invalid credentials, you will receive an error message.
Note: If a WebFOCUS environment is configured for Source Control and you are not connected to Source Control, WebFOCUS App Studio starts and you are prompted to connect to both WebFOCUS and Source Control when attempting to use the Source Control configured environment.
As a first step, you must first add a published domain folder to Source Control or select specific files to be added to Source Control.
Note: If files and folders are not published, Source Control options are not available. The same applies if you are not connected to Source Control.
The Source Control shortcut menu displays.
If the Source Control shortcut menu does not display, the WebFOCUS environment is not configured for Source Control. For more information on configuring a WebFOCUS environment for Source Control, see the TIBCO WebFOCUS® Security and Administration manual.
The Add to Source Control dialog box opens, as shown in the following image.
This operation binds your selected folder to a folder with the same name in the Source Control database, and adds all folders and files, based on your selection.
To verify this, select the folder and open the File/Folders Properties panel. The Source Control Status property value is Added to Source Control.
A folder that has been added to Source Control may contain files that are added to Source Control, and also files that are not.
Note: Files in a published folder are accessible to all developers.
The Source Control shortcut menu displays.
The following table describes how WebFOCUS App Studio uses the icons in the Configured Environments tree to indicate the status of a file in Source Control.
Icon |
Description |
---|---|
|
The folder has been added to Source Control. |
|
The file has been added to Source Control. |
|
The file has been checked out by the current user. |
|
The file has been exclusively checked out by another user. |
Note: Files not added to Source Control do not have overlay icons.
The following image shows an example of Source Control icons for added and checked out folders and files in the Configured Environments tree.
The Source Control shortcut menu displays.
The Check Out dialog box opens, as shown in the following image.
The Check Out dialog box closes, and the file is marked as checked out in WebFOCUS App Studio and in the Source Control repository. The Source Control Status property value in the File/Folder Properties panel is Checked out by <user name>, as shown in the following image.
Note: If the Check Out option is not available from the shortcut menu, it means that another user has checked out the file. To verify this, open the File/Folders Properties panel. The Source Control Status property value is Checked out by <user name>.
The Source Control shortcut menu displays.
The Check In dialog box opens, as shown in the following image.
The Check In dialog box closes.
To verify, open the File/Folders Properties panel. The Source Control Status property value is Added to Source Control.
The following are the Source Control status values that display in the WebFOCUS App Studio File/Folder Properties panel:
If you decide that you do not want to make changes to a file, you can undo its check out from Source Control.
The Source Control shortcut menu displays.
The Undo Check Out dialog box opens, as shown in the following image.
Note: Keeping the default options ensures that all changes will be discarded.
You can retrieve the latest version of a folder or file from the Source Control database and update the file in the WebFOCUS repository.
The Source Control shortcut menu displays.
The Get Latest Version dialog box opens, as shown in the following image.
Note: If you select this option, the Add New Projects check box is activated. Use this option if you have a folder or file that is in Source Control that you want to add back to WebFOCUS.
You can also use this option to get an entire new project from Source Control to WebFOCUS (the folder does not exist in WebFOCUS). To do this, create an empty folder in WebFOCUS that exactly matches the name and case of the folder name in Source Control. On the Get Latest Version dialog box, select the Update WebFOCUS Folder Properties, Subfolder, and Files and Add New Projects options.
Using the History feature, you can view information about a file, such as version history, date of creation or modification, and other details. You can also compare two versions of a file.
The Source Control shortcut menu displays.
The following table describes the options that are available on the History dialog box.
Button | Description |
---|---|
Close |
Closes the History dialog box. This option is always enabled. |
View |
Opens the selected version of the file in an editor. This option is disabled for multi-select. The viewer program can be set by a user, and is defaulted to notepad.exe. |
Details |
Displays the summary of a selected revision in a viewer. The same viewer is used for the View option. This option is disabled for multi-select. |
Get |
Updates the WebFOCUS version with the selected revision. This option is disabled for multi-select. |
Check Out |
Checks out the selected revision. This option is disabled for multi-select. |
Diff |
Enables you to compare two versions of a file from Source Control:
The diff program can be set by a user, and is defaulted to fc.exe. Batch program RunFC.bat, located in the bin folder, is used to perform the file comparison. |
Report |
Displays a summary for all of the revisions. The same viewer is used for the View option. This option is always enabled. |
Diff and View Setup |
Opens the History Viewer and Diff Setup dialog box, which enables you to configure the editor and application used as a Compare tool. This dialog box includes edit input controls for specifying the following:
For more information, see Diff and View Setup Dialog Box. |
The Diff and View Setup dialog box is shown in the following image.
You can type, copy-and-paste, or click the browse buttons located next to the edit controls to update the configuration and specify other programs. The browse buttons open the standard Windows Files Open dialog boxes.
By default, the product is configured to use the Windows built in editor notepad.exe. For compare, file RunFC.bat is configured to use the Windows fc.exe Compare tool and passes as arguments the two selected versions of the file, in addition to setting arguments /A and /N.
where:
Abbreviates the output of an ASCII comparison. Instead of displaying all of the lines that are different, fc displays only the first and last line for each set of differences.
Displays the line numbers during an ASCII comparison.
Performing a diff with these options displays the output in a command window, as shown in the following image.
Optionally, you can customize the Compare tool and editor. The Compare application you select needs to support the running from a command window and allow a user to pass, as input, the file names to be compared, for example, as done in RunFC.bat and the new sample Compare.bat.
The following example uses Notepad++ as the editor and Compare.bat as a new batch file that is configured to use the Compare tool KDiff3, as shown in the following image.
The following is in the compare.bat file:
ECHO OFF cls cmd /K "C:\Program Files (x86)\KDiff3\kdiff3.exe" %1 %2
The following image shows an example of a diff request using the above configuration.
Note: This process opens a command window that needs to be closed manually.
You can show the difference between a file in WebFOCUS and the file in the Source Control database.
The Source Control shortcut menu displays.
Note: Files for comparison get downloaded to the local temp folder on the user machine. For example, %LOCALAPPDATA%\Temp, which is mapped to C:\Users\<username>\AppData\Local\Temp.
Folder Level Operations
Note: Unbind does not remove the item from the Source Control database.
File Level Operations
The Check Out option retrieves the latest version of the selected file and allows you to edit it.
You can control the replacement of the local WebFOCUS file copy by selecting Do not update the file in the WebFOCUS repository. When this option is selected, the file is only marked as checked out and it does not update the file currently in the WebFOCUS repository with the version of the file that is in the Source Control database. This allows you to preserve changes that are made to the WebFOCUS version of the file. A later check in operation will update the Source Control file with the one from WebFOCUS.
Note: Keeping the default options ensures that all changes will be discarded.