Pramati Technologies

Working with Concurrent Versions System

Overview

The CVS integration in Studio is purely a file-based integration and only allows operations on source files in Studio. The files visible in the desk are the only files that are operated on from Studio in the CVS.

Studio CVS module cannot handle any hidden internal/meta files.

Configuring CVS as a tool

The CVS tool is deployed in Studio by default. The tool gets undeployed if the user unchecks any of the two tools - VCSService Tool or CVS available in the Configure dialog. This undeploys the CVS tool and the menu item disappears from the menu bar.

To start working with CVS in Studio, select File > IDE Options > CVS from the main menu. This brings up Preferences dialog where the following information has to be provided:

Click OK. Entering the information for User Name, Server and Repository Path enters the information in the CVSROOTs and prefixes it with :pserver: or :local: or :ext:, automatically.

To modify these values, click Edit. To delete a configured CVS root, use the Remove button.

The CVS features available as menu bar option in Studio are Checkout, Update, Commit, Add, Differences, Show Log, Show Status. All the output messages of the CVS are displayed in the CVS tab in the Output Panel.

Checking out a new module in CVS

Use Checkout to checkout a new module from the CVS server into the local system. The Checkout option can be performed both on the desk and the modules already existing in CVS. Bring up the Checkout Window by right clicking on the desk/module (existing in CVS)CVS > Checkout. The following screenshot displays how to checkout a new CVS module on the desk.

Fill in the following information to checkout the module or files as required:

After entering all the information required, click OK. This checks out the modules or the files under the desk or module, as required

Using command line operations

Use the command line operation in Studio to perform command CVS operations. Click on the CVS tab in the output panel and type the command in the CVS Commands field. These commands work directly on the file system, and are not tied to desk.

If `Apply to Desk' option is checked, the output of the commands is applied to desk. For example, the newly added files are added to the desk. For example, to update the module called EjbMod in a desk, select the module in the Explore Panel and type CVS update EjbMod in the CVS Commands field (CVS Tab). Similar operations can be performed on files.

Updating a module

Module/Folder/File on the Explore Panel > Right Click > CVS > Update

After checking out the files required for creating your private copy of source from the common repository, changes will be made continuously in the central source by other developers. Use the Update option periodically in your development process to reconcile the changes made locally, with any revisions applied to the source repository, since your last checkout or update.

The Update command, updates the modules and the files according to the options selected in the beginning using the Preferences dialog. The Update operation can be cancelled at any point using the Cancel button available in the progress bar dialog.

Use the CVS Update option from the main menu to update the active file (the file open in the Display Panel) from CVS.

Using Get Clean Copy option

Module/Folder/File > Right Click > CVS > Get Clean Copy

Updates the files with the latest version of the files in the CVS repository, and saves with a ".#" prefix and the version number suffix, if the local file is then modified. For example, the file name checkout.java with version 1.1 is saved as .#checkout.java.1.1.

Get Clean Copy updates the folders/modules/files according to the options selected in the beginning using the Preferences dialog.

Commiting changes made to files

Module/Folder/File on the Explore Panel > Right Click > CVS > Commit

This option is used to commit changes made locally, into the CVS repository. Selecting the option Commit from the main menu brings up the Commit dialog.

Clicking on OK commits the files and the progress is displayed using a progress bar dialog box. To cancel the operation at any point, use the Cancel button in the progress bar dialog.

Files that have been changed in the local file system and the changes have not been committed into the CVS repository have a red tick on the file icon.

Note: Use the CVS Commit option from the main menu to commit the changes made to the active file (the file open in the Display Panel) to CVS.
Adding files to CVS repository

Folder/File > Right Click > CVS > Add

Use this option from the main menu in Studio to add files stored locally into the CVS repository. The directory under which the files exist must already exist in the CVS repository.

When a file is added to the CVS, the CVS resolves the type of the file internally and adds it as a binary or text file. The files with the following extensions are added as binary files: .war, .jar, .ear, .zip, .jpeg, .gif, .tif, and .bmp.

All other files are added as text files. The added files are not placed in the source repository until commit is used to make the change permanent. Adding a file that was removed with the remove command will undo the effect of the remove, unless a commit command intervened.

Files and folders can also be added to the CVS on a right click. To do this, right click on the specific file/folder > CVS > Add, and then commit them.

Use the CVS Add from the main menu to add the active file (the file open in the Display Panel) to CVS.

Using Add All option

Folder > Right Click > CVS > Add All

This option is enabled only when the parent folder/module is already in CVS, and the folder contains other folders/files under it. Use this option to recursively add all the files/folders under the current folder (including the current folder) to the CVS repository. The files that are added using the Add All option are only marked for addition, and need to be committed for them to be added to the source repository.

Comparing file in a CVS repository to the local file

CVS > Show Differences

Use this option in Studio to compare the latest revision of the file in the CVS repository with the file saved locally. Studio uses the Studio diff tool to display the differences, by default. To use an external difference program, configure it using the Preferences dialog. CVS compares the local files with the revisions they were based on, and report any differences that are found.

Use the CVS Differences from the main menu to compare the latest revision of the file in the CVS repository with the file saved locally. The file referred above is the active file (the file open in the Display Panel).

Using Studio Diff Tool

Click on CVS > Differences from the main menu or right click on the required file and select CVS and then Differences to bring up the Studio Diff tool. The Diff tool displays the selected files side-by-side in a splitter view, which is called the File Comparison view (diff view).

Different colors are used to highlight the differences between the two files. Green areas indicate the lines that were aded to the modified file, and did not exist in the original file. Areas highlighted by blue lines indicate that the selected lines were modified in some way in the new file. Areas highlighted by red lines on both sides indicate that the selected lines were deleted in the modified file.

There are different ways of stepping through the differences in the two files. The gutter on the right hand side displays the summary of differences in the two files with the correct colors. Clicking on a specific color takes the cursor to the required difference.

Use the back and forward arrow buttons provided in the tool to move to the previous and next difference. Use Ctrl + Left arrow and Ctrl + Right arrow key, or the back and forward arrow buttons provided in the tool for moving to the first and the last difference directly. Use Alt+ up arrow key and Alt + down arrow key to move between the previous and the next differences.

Use the Toggle SplitPane button to view the two files either vertically or horizontally. Clicking abc button underlines the differences with a red line in the original file. The state of this button is remembered after the tool is closed and re-opened.

Clicking on the next button, displays the differences after ignoring the case of the letters. The state of this button is not remembered after the Diff tool is closed and re-opened.

Clicking on the space button, displays the differences after ignoring the blank spaces. The state of this button is not remembered after the Diff tool is closed and re-opened.

Viewing log information

Module/Folder/File > Right Click > CVS > Show Log

Use this option in Studio to display the log information of the source files. The output of this option includes the location of the RCS file, the "head" revision (the latest revision on the trunk), all symbolic names (tags) and some other things. For each revision, the revision number, the author, the number of lines added/deleted and the log message are printed. All times are displayed in Coordinated Universal Time (UTC). (Other parts of CVS print times in the local time zone).

Use the CVS Log option from the main menu to display the log information of the active file (the file open in the Display Panel).

Viewing file status

CVS > Show Status

Use this option to view the Status of a folder or a file in the CVS repository. Based on the operations performed on a checked out file, and what operations others have performed to that file in the repository, a file can be classified in a number of states.

Use the CVS Status option from the main menu to view the status of the active file (the file open in the Display Panel).

Removing a file or folder from repository

Right Click on the specific Folder/File > CVS > Remove

This option is used to mark the folders/files to be removed from the CVS repository. These files and folders have a black cross in their icon. The folders and files marked for removal are removed from the CVS repository only after they have been committed using the Commit command. Files marked for removal can be added back into the CVS repository using CVS > Add before they have been committed.

The Remove command can be cancelled at any point using the Cancel button in the Progress bar dialog.


Pramati Technologies  © Copyright   TOCPREVNEXTINDEX