Table of Contents
This section describes briefly how to use a version control system with CodeWarrior Pro. The first thing to do in order to use VCS in a project is to choose Version Control Settings... from the Edit menu. The dialog box that will be displayed is divided into two or more panels: the first one (labelled VCS Setup) is provided by the IDE and is common to all VCS plugins, while the other panels are provided by the plugins themselves and specific to each one of them. Only the panels related to the currently selected VCS plugin will be displayed.
Of course you will want to select the Use Version Control checkbox, in order to active VCS support. In the Method drop-down list you should see all VCS plugins installed on your machine: select abCVS. If abCVS is not displayed in this list, then abCVS is not correctly installed.
The list of plugins is generated during the IDE startup. If you installed abCVS while CodeWarrior Pro was running, you have to close and re-open the IDE.
In the Login Settings section, you may enter the user name and password. Those information are really needed only when you want to access a remote CVS server. Please notice that the Remember password checkbox must be selected in order to enter the password (and have it remembered from session to session). If the Remember password checkbox is disabled, whenever the Connect request is issued a dialog box is displayed to allow the user to type in the password. The Connect on open checkbox instruct the IDE to issue the Connect request automatically after the opening of the project. If the Always show login dialog checkbox is selected, the authentication dialog will be displayed on Connect even if Remember password is in use.
Because CodeWarrior Pro assumes that the user have to be authenticated, you must provide a username and a password even when accessing a local CVS repository. In this case, it is helpful to select both Connect on open and Remember password while entering a dummy username and password.
In the Database Path you should enter the path to the CVS repository. Unfortunately, though, the dialog allows only a local path to be selected. Therefore, this section is used only when accessing a local repository; when accessing a remote server, the path will be entered in the abCVS Settings panel. The Try to mount shared volume checkbox has no functionality whatsoever, just ignore it.
To avoid IDE complainings, the Database path section must be filled even when accessing a remote CVS server. In this case, just select any local folder, the information will be ignored by abCVS.
In the Local path section you should usually enter the root folder of your project. Only those files under the specified folder will be considered for VCS operations.
The Access remote server section is used when accessing a remote CVS server. The meaning of the various fields is quite straightforward:
the name of the server (e.g.: 192.168.1.1 or victor.iaanus.com)
the path, on the server, to the repository (e.g.: /usr/local/cvsroot)
the authentication method to use. Up to now, only the server and pserver methods are supported. In order to use the pserver method a specifically patched version of cvs.exe is needed. Please consult the FAQ about the need for a patch.
the gzip compression level to be used in client/server transactions. See the CVS documentation about this feature.
Using abCVS with the pserver method without a specifically patched version of cvs.exe will hang the IDE. A future version of abCVS will provide the pserver method by implementing directly the CVS client protocol, without the need of cvs.exe at all.
In the CVS Executable textbox you should enter the pathname the file cvs.exe that is to be used. If the file can be found using the PATH environment variable, this box will be automatically filled up.
With the Trace CVS calls combobox you can specify if you want to trace, for diagnostic purposes, the CVS commands issued by abCVS. A file named abCVS.log will be created on the desktop with the required informations.
Check the Use alternate menu system checkbox to activate the alternate menu system described in the next chapter.
abCVS does not contain CVS code. You can use whatever implementation of CVS you want or find on the net, even a customized one, provided it has the same command line interface as the original CVS. abCVS has been tested with the following distributions of CVS:
The executable file cvs.exe distributed with WinCVS v1.1b7 cannot be used with abCVS because of a bug while parsing the command line of the cvs commit command.
A working installation of CVS is required for abCVS to provide IDE access to its functions. The recommended option is to let the PATH environment variable include the directory of the CVS executable cvs.exe. If you prefer not to modify the PATH variable, or you have several versions of CVS installed on your machine, you can select the CVS executable from the abCVS preference panel right from the CodeWarrior Pro IDE.
Within abCVS it is not possible to create new repositories, or to perform the cvs checkout command. This administrative tasks should be performed from the command line or from a GUI front-end like WinCVS. Please refer to the CVS documentation for the description of these operations.
It is essential for the proper working of CVS that the cvswrapper file is properly set up to make CVS treat CodeWarrior Pro project files (i.e.: the files with the .mcp extension) as binary files. By default, CVS treat all files as text, thus corrupting project files performing the Commit and the Update commands. Please refer to the CVS documentation for details. This problem is partly addressed by abCVS which automatically specifies the -kb option when working on project files.
abCVS exploits the possibility of the CodeWarrior Pro plug-in API to redefine the names of the version control requests, in order to match, as close as possible, the CVS terminology. For example, the Check-out request of CodeWarrior Pro is replaced by the abCVS request Edit. Unfortunately, because of a bug in the IDE, a few dialog boxes still display the original wording of the request. For example, if you try to edit a non Edit-ed file, a dialog box will appear with the three options: Make Writable, Check Out and Cancel. Of course, if you press Check Out the Edit request is issued instead. This problem has already been reported to the CodeWarrior Pro engineers and may be hopefully fixed in some future release of the IDE.
abCVS implements the following requests requests:
| abCVS request | Normal | Advanced | Recursive | Replaces CW request | |
|---|---|---|---|---|---|
| Normal | Advanced | ||||
| Synchronize | Yes | N/A | N/A | N/A | |
| Update | Yes | Yes | Yes | Yes | Get |
| Edit | Yes | Yes | Checkout | ||
| Undo Edit | Yes | Yes | Undo Checkout | ||
| Commit | Yes | Yes | Checkin | ||
| View | Yes | Yes | |||
| Log | Yes | History | |||
| Status | Yes | Yes | Yes | Yes | |
| Difference | Yes | Yes | Yes | Yes | |
| Tag | Yes | Yes | Label | ||
| Add | Yes | Planned | |||
| Connect | Yes | N/A | N/A | ||
| Disconnect | Yes | N/A | N/A | ||
| About | Yes | N/A | N/A | ||
Following common Windows GUI guidelines, the name of all requests that requires the user to fill a dialog (i.e.: Commit, Tag and all advanced request) appear in the menu followed by ellipsis. Requests which have both a regular and an advanced form will appear twice in the menu (i.e.: Update and Update...). An exception is the Status request for which the advanced version is displayed as Status & labels.
If you selected Use alternate menu systems in the abCVS settings panel then the advanced versions of all commands will be removed from the menus. In order to access them, you have to keep the Shift pressed while selecting the regular command. Pressing the Shift for requests which has no advanced command has no effect.
The alternate mode matches the default mode used in the Macintosh version of CodeWarrior Pro where advanced physically requests replace the regular ones when the modificator key is pressed. Unfortunately, this feature has not been implemented in the Windows version. So abCVS have to use a trick to obtain it, with the drawback of losing the visual cue. For this reason the alternate mode has been made optional.
A recursive request will operate on all file under CVS control contained in the folder specified in VCS Setup panel and its subfolders, whether they are included in the working project or not.
This request, as the name suggests, synchronize the IDE knowledge of the status of the involved documents with their real status. This is important because the IDE caches such informations, and have to be informed if the status is changed by an external mean (such as a command line call to cvs or an operation performed through WinCVS). It may also happen that the IDE displays the status incorrectly even if no external operation has been issued. This a CodeWarrior Pro problem and is not caused by abCVS. Anyway, invoking Synchronize will always fix the problem.
The Synchronize request is implemented by direct parsing of the CVS/Entries files.
This request is used for many tasks, in particular to update a document to the latest revision of the involved documents. It effectively implemented by invoking cvs update filename. Please refer to the CVS documentation for the many uses of this command.
The advanced version of this requests displays the following dialog:
and effectively invokes the command: cvs update [-d date] [-r rev] [-A] [-f] filename.
If the Revision/Tag combobox is filled with a revision tag/number, then the given value is used as the rev parameter of the -r option. For a non-recursive request the combobox is automatically filled with all tags present in the history of the given file. For a recursive operation the combobox will contain all tags present in the history of any file in the specified folder and subfolders. As accessing the history may be a lengthy operation, the the combobox is populated only if the combobox is "dropped down".
For non-recursive request only, the Graph button can be used to access a tree-like representation of the given file history.
In the Date section, the user may either specify o date/time or a number of hours/days/months to be used as the date parameter of the -d option.
If the Reset sticky tags checkbox is selected, the -A option is added to the command line.
For recursive requests only, the Use head revision if tag/date not found checkbox can be used to add the -f to the command line.
Also for recursive requests only, with the Preview button you can preview the effect of your request before performing it. This can also be useful to see graphically the status of all your files in alternative to the Status command.
This requests make the file read-write and invokes cvs edit filename. The effect is to make a backup copy of the revision being updated and may be used to inform other developers (in a multi-developers environment) that the file is being edited.
This request undoes the effect of an Edit requests. Effectively, it invokes cvs unedit filename that replaces the working revision with the backup copy made during the Edit requests and makes the file read-only. The user will be warned about the possibility of losing the working revision, if applicable.
This requests commits the working revision into the CVS database. That makes it the new head revision, in addition, the involved file is made read-only. This request also cancel a previous Edit requests. The implementation is equivalent to calling in sequence cvs commit -F commentfile filename and cvs unedit filename. The user is required to enter a comment to describe the revision being committed.
With this request the user may have a look to any revision present in the database of the involved file. It is implemented via cvs update -p filename.
The advanced version of this requests displays the following dialog:
and effectively invokes the command: cvs update -p [-d date] [-r rev] filename.
If the Revision/Tag combobox is filled with a revision tag/number, then the given value is used as the rev parameter of the -r option. The combobox is automatically filled with all tags present in the history of the given file. As accessing the history may be a lengthy operation, the the combobox is populated only if the combobox is "dropped down".
As in the Update request, the Graph button can be used to access a tree-like representation of the given file history.
In the Date section, the user may either specify o date/time or a number of hours/days/months to be used as the date parameter of the -d option.
This requests creates a report about the revisions of the involved file contained in the database. Effectively, a new text file is created with the output of the command cvs log filename.
This requests creates a report with the CVS status of the involved file(s). Effectively, a new text file is created with the output of the command cvs status filename for the regular version and cvs status -v filename for the advanced version.
For non-recursive requests, Difference pops up the CodeWarrior Pro file comparison window to let the user compare all difference between the working revision and any other revision of the involved file. On the right pane of the window the user will see the working revision and will have the opportunity to include and/or exclude any difference found. The request is implemented by capturing the output of the command cvs update -p [-d date] [-r rev] filename.
For recursive requests, the effect is to create a text file containing the captured output of the command cvs diff [-d date] [-r rev] foldername.
The advanced dialog is essentially identical to the one described for the Update command.
This requests pops up the following dialog:
To proceed, the user must provide a valid tag name, i.e.: a name without spaces, starting with a letter and containing only letters, digits and the characters "-" (minus) and "_" (underscore). If the user pressed Ok, the command cvs tag tagname filename is effectively invoked.
If one of the checkboxes Overwrite existing tag with the same name, Make this tag a branch tag and Check that the file is unmodified is selected, the related command line option (respectively -F, -b and -c) is added to the command line.
The Use for all remaining files checkbox is available when a non-recursive request is applied to more that one file. If it is selected, the content of the dialog is applied to all remaining files.
This request effectively invokes cvs add filename that "marks" the involved file for addition into the database. The file will not be effectively sent to the database until a Commit request is issued. In the IDE, the file will be displayed as if it were in check-out.
This request has not yet been implemented.