|
The CVS integration in Studio is purely a file-based integration and only allows CVS functions to be performed 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.
In a future edition of Studio, the Collaborative Component Development feature will handle the component abstractions completely and effectively.
The CVS tool is deployed in Studio by default. The tool gets undeployed if the user un-checks any of the two tools - VCSService Tool or CVS available in the Tools Configure dialog. This undeploys the CVS tool and the menu item disappears from the menu bar.
To start working with CVS in Studio, click CVS > Preferences on the main menu.
This brings up Preferences dialog where the following information has to be provided:
CVS Client Location The absolute path of the command line CVS client executable that has been installed on the system. Example, c:\Program Files\WinCvs 1.2\cvs.exe
CVSROOTS Clicking on the Add button brings up the Add new CVSROOT dialog, which allows adding a new CVSROOT
Entering the information for the User Name, Server and Repository Path automatically types the information in the CVSROOTs prefixed with :pserver: or :local:.
To modify these values, click on the Edit button. To delete a configured ROOT, use the Delete button.
External Diff Program Check this field if the cvs is to use an external difference program. Browse for and enter the url of where the external program is installed. Keeping the option unchecked uses the default Studio diff tool.
Update Options Set the Update options in the beginning while configuring the preferences. These options will be used each time the Update operation is performed for any folder or file. The options are:
After configuring the CVS, start using it in Studio. The features that Studio provides from its main menu are Update, Commit, Add, Difference, Log, Status. All the output messages of the CVS are displayed in the CVS tab in the Output Panel.
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) > Checkout. The screenshot below displays how to checkout a new cvs module on the Desk.
Fill in the following information to checkout the module or files as required:
Create New Check this option to create a Module in the Desk using the Checkout window.
Use Existing Check this option if an existing cvs module in the Desk is to be used to checkout sources.
Name Enter the name of the module where the files are checked out. If the option Use Existing is checked, choose from the existing cvs modules in the Desk displayed in the combo box.
Type Select the type of the module where the files are to be checked out. If the option - Use Existing is checked, this field is disabled as the module exists and the module type has been already defined.
Classes Dir Enter or browse for the classes directory of the Module.
CVSROOT Select from the CVSROOT added in the Preferences dialog, or browse for a new CVSROOT. Browsing for a new CVSROOT takes the user to the Add New CVSROOT dialog.
Source Root Enter the Source Root name that is to be checked out from the cvs server.
Package Path Enter the path of the package in the Source Root that is to be checked out. Entering the path is optional and is used only in case when only few packages in the source root are to be checked out.
Checkout Dir Enter the url of the directory where the files are to be checked out.
Checkout Options There are four options provided in the section, which are used to check out folders and files.
After entering all the information required, click OK. This checks out the modules or the files under the Desk or module, as required.
Black Tick This icon represents all modules, folders and files under the Desk, which are a part of the CVS.
Red Tick This icon represents all the files which have been changed locally and are yet to be committed in the CVS. A red tick on a folder means that it contains some files which are yet to be committed, that is, they are either newly added, modified, or marked for deletion.
Red Thunderstorm This icon represents all the files with conflict. CVS refuses to check in a file if a conflict occurred and has not been resolved.
Red Cross This icon represents all the files marked for removal. When these files are committed, they are deleted pemanently.
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.
Apply to Desk If this option is checked, then the output of the commands is applied to desk. For example, the newly added files are added to the Desk.
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.
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.
Module/Folder/File > Right Click > 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.
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.
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 in the icon.
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.
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.
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.
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).
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 (or just the "diff view" for short).
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 keys, or the back and forward arrow buttons provided in the tool to move to the previous and next difference. Use Ctrl + back arrow key, and Ctrl + forward arrow key, or the
and
arrow buttons provided in the tool for moving to the first and the last difference directly. Use Ctrl + up arrow key and Ctrl + down arrow key to move between the previous and the next differences.
Once you have selected a difference (either by using the arrow or by clicking it with the mouse), synchronize one side with the other by either using the right and left arrow keys, or the scroll bars provided.
Use the Toggle SplitPane button to view the two files either vertically or horizontally. Clicking on the button,
highlights the differences by underlining them 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 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 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.
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).
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).
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 |
|