[Kerberos for Macintosh] [Applications] [Miscellaneous Documentation]
CWCVS is a CodeWarrior version control plugin that uses AppleEvents to communicate to MacCVS. CWCVS only does a minimal amount of processing. Most of the work is done by MacCVS, in particular by the CVS engine in MacCVS.
In order to understand the behavior of CWCVS, you need to first understand the general behavior of version control in the CodeWarrior IDE.
Version control in CodeWarrior is based on the premise that there is a basic set of commands that is common to all version control tools. The names for those commands, and their abstract behaviors are specified by CodeWarrior. The exact implementation is provided by version control plugins, which can choose to support any subset of those commands.
When version control is configured in CodeWarrior, several changes happen to the user interface:
The version control () menu appears in the IDE menubar. It contains all version control commands provided by CodeWarrior.
The menu contains four kinds of commands: document commands, project commands, recursive commands, and other commands:
Document commands are all commands after the Recursive submenu, and before the Disconnect menu item. Document commands apply to the document in the frontmost window, if the front window is a document window, or the documents selected in the project window, if the front window is a project window.
Project commands are in the Project submenu. They apply to the default project, if the front window is not a project window, or the front project, of the front window is a project window.
Recursive commands are in the Recursive submenu, and they apply to all files and folders (recursively) contained in the folder specified as the project root in version control settings for the default project, if the front window is not a project window, or for the front project, if the front window is a project window.
Other commands are the Synchronize Status, Connect, Disconnect, About, and Variables commands. Their scope varies and is explained below.
When version control is not configured, each document window has a popup menu indicating whether the document file is locked or unlocked. When version control is configured, this popup window indicates the version contrrol status of the document, and also contains menu items that for version control commands that can change that status.
The version control status menu can be at the top or at the bottom of a documwnt window, depending on your settings:
The icon of the popup menu indicates in which of the following five states a document is:
A file will have locked or unlocked state if it is not in one of subfolders of the project root (as specified in the version control preferences), or if it has not been added to version control (using the Add command).
The remaining three states indicate that a file is version -controlled. Checked-in state means the file is locked.Checked-out and writeable states mean that the file is not locked; in checked-out state, the file was updated from the repository before being modified, whereas in the writeable state file was not updated.
With version control configured, each project window's files display will have an additional column, in which the version control status of each file is displayed. In addition to that, a project window will have a version status icon in the bottom left corner indication the version status of the project file itself:
Most commands in CodeWarrior exist in three flavors: document, project, and recursive. The only difference is the scope: document commands apply to one or more documents (either the one in the front window, or the selection in a project window); project commands apply to the front or the default project; recursive commands apply to all files and folders in the project root of the front or the default project.
Effects of those commands are essentially the same regardless of the flavor; the only thing that changes with flavor is the files on which a command operates.
Each CodeWarrior version control command, when using CWCVS, calls into MacCVS and then executes a CVS command line. The following list describes exactly what each command does and in which flavors it is available.
This command updates files to the most recent repository version. The CVS command executed is
The checkin command commits changes to the repository. The CVS command executed is
This command updates files to their most recent repository version and unlocks them. The CVS command executed is
cvs update -w
The undo checkout command updates files to their most recent repository version and locks them. The CVS command executed is
cvs update -r
The label command is used to tag files with a symbolic tag, by executing:
The history command displays the CVS log for files in a new CodeWarrior window. The output is generated by running the following CVS command:
cvs log <files>
This command displays the CVS status of files, as returned in the output of:
The difference command compares files with their most recent repository versions, by running
cvs diff -c
The rename command renames a file in the recommended CVS way, by first adding it to the repository under the new name and then removing it under the old name:
cvs add <new filename> cvs remove <old filename>
The add command schedules files for addition to the repository by executing:
The remove command schedules files for removal from the repository by executing:
The files will also be moved to the trash.
CWCVS also implements the miscellaneous version control commands.
This command causes CodeWarrior to recheck version control status of each file in the front project. This is useful when the IDE gets confused about status of some files. Holding down shift when clicking in the menubar will change this command to "Synchronize document", and then it will only apply to the front document or the selecting in the front project.
This command causes CWCVS to launch MacCVS if it is not already running
This command does nothing with CWCVS
The about command displays the CWCVS about box
The variables command executes
status in your
project root. (Why this is useful, or assigned to the variables
command, is unclear to me.)
The VCS environment control panel can be used to set environment variables, which CWCVS then passes on to MacCVS. You must set your CVS root (the CVSROOT variable) correctly, or otherwise CWCVS might not work correctly. (In particular, it will not work correctly when your Kerberos tickets expire.)
Questions or comments? Send mail to email@example.com
Last updated on $Date: 2003/11/18 21:58:27 $
Last modified by $Author: smcguire $